Spread ASP.NET 6.0 Product Documentation
SetDirectAltRowInfo Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > BaseSheetStyleModel Class : SetDirectAltRowInfo Method


index
Index of the alternating row style to set; must be between 0 and AltRowCount-1
info
Source StyleInfo object that has style information

Glossary Item Box

Sets the specified alternating row style in the model.

Syntax

Visual Basic (Declaration) 
Public Overridable Sub SetDirectAltRowInfo( _
   ByVal index As Integer, _
   ByVal info As StyleInfo _
) 
Visual Basic (Usage)Copy Code
Dim instance As BaseSheetStyleModel
Dim index As Integer
Dim info As StyleInfo
 
instance.SetDirectAltRowInfo(index, info)
C# 
public virtual void SetDirectAltRowInfo( 
   int index,
   StyleInfo info
)

Parameters

index
Index of the alternating row style to set; must be between 0 and AltRowCount-1
info
Source StyleInfo object that has style information

Return Value

This implementation does nothing and returns null.

Remarks

Spread uses the alternating row style to merge alternating row styles with the composite style for a cell immediately prior to painting the cell.

This implementation does nothing and returns null.

Example

This example sets the background color for the alternating rows for the style.
C#Copy Code
FarPoint.Web.Spread.Model.BaseSheetStyleModel bs;
bs = (FarPoint.Web.Spread.Model.BaseSheetStyleModel)FpSpread1.ActiveSheetView.StyleModel;
FarPoint.Web.Spread.StyleInfo si = new FarPoint.Web.Spread.StyleInfo();
si.BackColor = Color.Yellow;
bs.SetDirectAltRowInfo(0, si);

si = bs.GetDirectAltRowInfo(0, si);
Response.Write(si.BackColor.ToString());
Visual BasicCopy Code
Dim bs As FarPoint.Web.Spread.Model.BaseSheetStyleModel
bs = FpSpread1.ActiveSheetView.StyleModel
Dim si As New FarPoint.Web.Spread.StyleInfo
si.BackColor = Color.Yellow
bs.SetDirectAltRowInfo(0, si)

si = bs.GetDirectAltRowInfo(0, si)
Response.Write(si.BackColor.ToString())

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.