Spread Windows Forms 11.0 Product Documentation
GetDirectAltRowName Method (INamedStyleSupport)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > INamedStyleSupport Interface : GetDirectAltRowName Method
Index of the alternating row style to set; must be between 0 and AltRowCount-1
Gets the style name for an alternating row style.
Syntax
'Declaration
 
Function GetDirectAltRowName( _
   ByVal index As Integer _
) As String
'Usage
 
Dim instance As INamedStyleSupport
Dim index As Integer
Dim value As String
 
value = instance.GetDirectAltRowName(index)
string GetDirectAltRowName( 
   int index
)

Parameters

index
Index of the alternating row style to set; must be between 0 and AltRowCount-1

Return Value

String containing the alternating row style name
Example
This example returns the name of the named style used to change the background color of the alternating rows in the column header rows.
FarPoint.Win.Spread.Model.INamedStyleSupport ins;
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle("StyleHeaders");
ns.BackColor = Color.LightBlue;
fpSpread1.NamedStyles.Add(ns);
fpSpread1.ActiveSheet.ColumnHeaderRowCount = 5;
ins = (FarPoint.Win.Spread.Model.INamedStyleSupport)fpSpread1.ActiveSheet.Models.ColumnHeaderStyle;
ins.SetDirectAltRowName(1, "StyleHeaders");
label1.Text = "The name of the style used to change the color in the headers is " + ins.GetDirectAltRowName(1).ToString();
Dim ins As FarPoint.Win.Spread.Model.INamedStyleSupport
Dim ns As New FarPoint.Win.Spread.NamedStyle("StyleHeaders")
ns.BackColor = Color.LightBlue
FpSpread1.NamedStyles.Add(ns)
FpSpread1.ActiveSheet.ColumnHeaderRowCount = 5
ins = FpSpread1.ActiveSheet.Models.ColumnHeaderStyle
ins.SetDirectAltRowName(1, "StyleHeaders")
Label1.Text = "The name of the style used to change the color in the headers is " & ins.GetDirectAltRowName(1).ToString()
See Also

Reference

INamedStyleSupport Interface
INamedStyleSupport Members