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


index
Index of the alternating row style to set; must be between 0 and AltRowCount-1
info
Source StyleInfo object that has style information

Glossary Item Box

Sets the specified alternating row style in the model.

Syntax

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

Parameters

index
Index of the alternating row style to set; must be between 0 and AltRowCount-1
info
Source StyleInfo object that has style information

Remarks

This implementation does nothing.

"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 sets the number of alternating rows in the model.
C#Copy Code
FarPoint.Win.Spread.Model.BaseSheetStyleModel styleModel;
FarPoint.Win.Spread.StyleInfo sInfo = new FarPoint.Win.Spread.StyleInfo();
sInfo.BackColor = Color.LightBlue;
styleModel = (FarPoint.Win.Spread.Model.BaseSheetStyleModel)fpSpread1.ActiveSheet.Models.Style;
styleModel.AltRowCount = 3;
styleModel.SetDirectAltRowInfo(1, sInfo);
Visual BasicCopy Code
Dim styleModel As FarPoint.Win.Spread.Model.BaseSheetStyleModel
Dim sInfo As New FarPoint.Win.Spread.StyleInfo()
sInfo.BackColor = Color.LightBlue
styleModel = FpSpread1.ActiveSheet.Models.Style
styleModel.AltRowCount = 3
styleModel.SetDirectAltRowInfo(1, sInfo)

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

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