Spread for ASP.NET 7.0 Product Documentation
GetDirectAltRowName Method
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > INamedStyleSupport Interface : GetDirectAltRowName Method


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

Glossary Item Box

Gets the style name for an alternating row style.

Syntax

Visual Basic (Declaration) 
Function GetDirectAltRowName( _
   ByVal index As Integer _
) As String
Visual Basic (Usage)Copy Code
Dim instance As INamedStyleSupport
Dim index As Integer
Dim value As String
 
value = instance.GetDirectAltRowName(index)
C# 
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 name of the style for the specified alternating row index, or an emtpy string if the specified alternating row index has no named style assigned

Example

This example returns the name of the style used by the style model.
C#Copy Code
FarPoint.Web.Spread.Model.INamedStyleSupport ins; 
FarPoint.Web.Spread.NamedStyle ns = new FarPoint.Web.Spread.NamedStyle("StyleHeaders"); 
ns.BackColor = Color.LightBlue; 
FpSpread1.NamedStyles.Add(ns); 
FpSpread1.ActiveSheetView.ColumnHeader.RowCount = 5; 
ins = (FarPoint.Web.Spread.Model.INamedStyleSupport)FpSpread1.ActiveSheetView.ColumnHeaderStyleModel; 
ins.SetDirectAltRowName(1, "StyleHeaders"); 
Response.Write("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.Web.Spread.Model.INamedStyleSupport
Dim ns As New FarPoint.Web.Spread.NamedStyle("StyleHeaders")
ns.BackColor = Color.LightBlue
FpSpread1.NamedStyles.Add(ns)
FpSpread1.ActiveSheetView.ColumnHeader.RowCount = 5
ins = FpSpread1.ActiveSheetView.ColumnHeaderStyleModel
ins.SetDirectAltRowName(1, "StyleHeaders")
Response.Write("The name of the style used to change the color in the headers is " & ins.GetDirectAltRowName(1).ToString())

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

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