Spread Windows Forms 7.0 Product Documentation
SetDirectAltRowInfo Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > DefaultSheetStyleModel Class : SetDirectAltRowInfo Method


index
Index of the alternating row style to set
info
Style object set

Glossary Item Box

Sets the specified alternating row style in the model.

Syntax

Visual Basic (Declaration) 
Public Overrides Sub SetDirectAltRowInfo( _
   ByVal index As Integer, _
   ByVal info As StyleInfo _
) 
Visual Basic (Usage)Copy Code
Dim instance As DefaultSheetStyleModel
Dim index As Integer
Dim info As StyleInfo
 
instance.SetDirectAltRowInfo(index, info)
C# 
public override void SetDirectAltRowInfo( 
   int index,
   StyleInfo info
)

Parameters

index
Index of the alternating row style to set
info
Style object set

Exceptions

ExceptionDescription
System.IndexOutOfRangeException Specified style index is not valid; must be between 0 and the total number of styles

Remarks

"Direct" in the style model means "not composite" or "not inherited." This method, SetDirectAltRowInfo, sets the alternating style properties. The alternating style is used by the viewport controls for merging alternating row styles with the composite style for a cell immediately prior to rendering.

SetDirectInfo sets the other style properties of a cell, column, or row directly.

The index (zero-based) must be between 0 and (AltRowCount-1).

Example

This example illustrates the use of this member by returning the style information for the first alternating row.
C#Copy Code
FarPoint.Win.Spread.Model.DefaultSheetStyleModel defstyleModel = new FarPoint.Win.Spread.Model.DefaultSheetStyleModel();
FarPoint.Win.Spread.StyleInfo sInfo = new FarPoint.Win.Spread.StyleInfo();
FarPoint.Win.Spread.StyleInfo composite = new FarPoint.Win.Spread.StyleInfo();
defstyleModel = (FarPoint.Win.Spread.Model.DefaultSheetStyleModel)fpSpread1.ActiveSheet.Models.Style;
sInfo.BackColor = Color.LightBlue;
defstyleModel.SetDirectAltRowInfo(0, sInfo);
composite = defstyleModel.GetDirectAltRowInfo(0, sInfo);
listBox1.Items.Add(composite.BackColor.ToString());
Visual BasicCopy Code
Dim defstyleModel As New FarPoint.Win.Spread.Model.DefaultSheetStyleModel()
Dim sInfo As New FarPoint.Win.Spread.StyleInfo()
Dim composite As New FarPoint.Win.Spread.StyleInfo()
defstyleModel = FpSpread1.ActiveSheet.Models.Style
sInfo.BackColor = Color.LightBlue
defstyleModel.SetDirectAltRowInfo(0, sInfo)
composite = defstyleModel.GetDirectAltRowInfo(0, sInfo)
ListBox1.Items.Add(composite.BackColor.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.