Gets the specified alternating row style in the model.
Syntax
Parameters
- index
- Index of the alternating row style to get; must be between 0 and AltRowCount-1
- destInfo
- Style set (StyleInfo object) to use for composing the styles; if destInfo is null then a new StyleInfo should be created and used
Return Value
StyleInfo object containing the style information
Remarks
Example
This example sets and returns the alternating row information for the cell.
C# | Copy Code |
---|
FarPoint.Win.Spread.Model.ISheetStyleModel ssm;
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle("StyleData");
FarPoint.Win.Spread.StyleInfo si;
ssm = (FarPoint.Win.Spread.Model.ISheetStyleModel)fpSpread1.ActiveSheet.Models.Style;
ns.BackColor = Color.LightBlue;
fpSpread1.NamedStyles.Add(ns);
ssm.SetDirectAltRowInfo(0, ns);
si = ssm.GetDirectAltRowInfo(0, null);
label1.Text = "The backcolor of the first alternating row is " + si.BackColor.ToString(); |
Visual Basic | Copy Code |
---|
Dim ssm As FarPoint.Win.Spread.Model.ISheetStyleModel
Dim ns As New FarPoint.Win.Spread.NamedStyle("StyleData")
Dim si As FarPoint.Win.Spread.StyleInfo
ssm = FpSpread1.ActiveSheet.Models.Style
ns.BackColor = Color.LightBlue
FpSpread1.NamedStyles.Add(ns)
ssm.SetDirectAltRowInfo(0, ns)
si = ssm.GetDirectAltRowInfo(0, Nothing)
Label1.Text = "The backcolor of the first alternating row is " & si.BackColor.ToString() |
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also