Spread Windows Forms 7.0 Product Documentation
SetDirectAltRowName Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > INamedStyleSupport Interface : SetDirectAltRowName Method


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

Glossary Item Box

Sets the specified alternating row style in the model to the specified named style.

Syntax

Visual Basic (Declaration) 
Sub SetDirectAltRowName( _
   ByVal index As Integer, _
   ByVal styleName As String _
) 
Visual Basic (Usage)Copy Code
Dim instance As INamedStyleSupport
Dim index As Integer
Dim styleName As String
 
instance.SetDirectAltRowName(index, styleName)
C# 
void SetDirectAltRowName( 
   int index,
   string styleName
)

Parameters

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

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.
C#Copy Code
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();
Visual BasicCopy Code
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()

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

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.