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 |
---|
private void Page_Load(object sender,System.EventArgs e)
{
if(this.IsPostBack)return;
FarPoint.Web.Spread.Model.DefaultSheetStyleModel model=(FarPoint.Web.Spread.Model.DefaultSheetStyleModel)FpSpread1.Sheets[0].StyleModel;
FarPoint.Web.Spread.StyleInfo style=new FarPoint.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 |
---|
Private Sub Page_Load(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles MyBase.Load
If(IsPostBack)Then Return
Dim model As FarPoint.Web.Spread.Model.DefaultSheetStyleModel=FpSpread1.Sheets(0).StyleModel
model.AltRowCount=3
Dim style As New FarPoint.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())
End Sub |
Requirements
Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6
See Also