Gets or sets the number of alternating rows in the style model.
Syntax
Visual Basic (Declaration) | |
---|
Public Overrides Property AltRowCount As Integer |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As DefaultSheetStyleModel
Dim value As Integer
instance.AltRowCount = value
value = instance.AltRowCount |
C# | |
---|
public override int AltRowCount {get; set;} |
Property Value
Integer number of alternating rows
Example
This example sets the AltRowCount of the DefaultSheetStyleModel and sets the alternating row styles. The value of the AltRowCount property is returned to a list box.
C# | Copy Code |
---|
privatevoidPage_Load(objectsender,System.EventArgse)
{
if(this.IsPostBack)return;
FarPoint.Web.Spread.Model.DefaultSheetStyleModelmodel=(FarPoint.Web.Spread.Model.DefaultSheetStyleModel)FpSpread1.Sheets[0].StyleModel;
FarPoint.Web.Spread.StyleInfostyle=newFarPoint.Web.Spread.StyleInfo();
model.AltRowCount=3;
style.BackColor=Color.Yellow;
model.SetDirectAltRowInfo(0,style);
style.Reset();
style.BackColor=Color.Blue;
model.SetDirectAltRowInfo(1,style);
style.Reset();
style.BackColor=Color.Red;
model.SetDirectAltRowInfo(2,style);
ListBox1.Items.Add(model.AltRowCount.ToString());
} |
Visual Basic | Copy Code |
---|
PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load
If(IsPostBack)ThenReturn
DimmodelAsFarPoint.Web.Spread.Model.DefaultSheetStyleModel=FpSpread1.Sheets(0).StyleModel
model.AltRowCount=3
DimstyleAsNewFarPoint.Web.Spread.StyleInfo()
style.BackColor=Color.Yellow
model.SetDirectAltRowInfo(0,style)
style.Reset()
style.BackColor=Color.Blue
model.SetDirectAltRowInfo(1,style)
style.Reset()
style.BackColor=Color.Red
model.SetDirectAltRowInfo(2,style)
ListBox1.Items.Add(model.AltRowCount.ToString())
EndSub |
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