Spread Windows Forms 11.0 Product Documentation
AltRowCount Property (ISheetStyleModel)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > ISheetStyleModel Interface : AltRowCount Property
Gets or sets the number of alternating row styles in the model.
Syntax
'Declaration
 
Property AltRowCount As Integer
'Usage
 
Dim instance As ISheetStyleModel
Dim value As Integer
 
instance.AltRowCount = value
 
value = instance.AltRowCount
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.
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);
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)
See Also

Reference

ISheetStyleModel Interface
ISheetStyleModel Members