Gets or sets the number of alternating row styles in the model.
Syntax
Visual Basic (Declaration) | |
---|
Property AltRowCount As Integer |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As ISheetStyleModel
Dim value As Integer
instance.AltRowCount = value
value = instance.AltRowCount |
C# | |
---|
int AltRowCount {get; set;} |
Property Value
Integer number of alternating rows
Example
This example sets the number of alternating rows and changes the background color.
C# | Copy Code |
---|
FarPoint.Win.Spread.Model.ISheetStyleModel ssm;
FarPoint.Win.Spread.Model.ISheetStyleModel ssm1;
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle("StyleData");
FarPoint.Win.Spread.NamedStyle ns1 = new FarPoint.Win.Spread.NamedStyle("StyleHeaders");
ssm = (FarPoint.Win.Spread.Model.ISheetStyleModel)fpSpread1.ActiveSheet.Models.Style;
ssm1 = (FarPoint.Win.Spread.Model.ISheetStyleModel)fpSpread1.ActiveSheet.Models.ColumnHeaderStyle;
ns.BackColor = Color.LightBlue;
ns1.BackColor = Color.Yellow;
fpSpread1.NamedStyles.AddRange(new object[] {ns, ns1});
ssm.AltRowCount = 2;
ssm.SetDirectAltRowInfo(0, ns);
ssm1.SetDirectAltRowInfo(0, ns1); |
Visual Basic | Copy Code |
---|
Dim ssm As FarPoint.Win.Spread.Model.ISheetStyleModel
Dim ssm1 As FarPoint.Win.Spread.Model.ISheetStyleModel
Dim ns As New FarPoint.Win.Spread.NamedStyle("StyleData")
Dim ns1 As New FarPoint.Win.Spread.NamedStyle("StyleHeaders")
ssm = FpSpread1.ActiveSheet.Models.Style
ssm1 = FpSpread1.ActiveSheet.Models.ColumnHeaderStyle
ns.BackColor = Color.LightBlue
ns1.BackColor = Color.Yellow
FpSpread1.NamedStyles.AddRange(New Object() {ns, ns1})
ssm.AltRowCount = 2
ssm.SetDirectAltRowInfo(0, ns)
ssm1.SetDirectAltRowInfo(0, ns1) |
Requirements
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8
See Also