Spread Windows Forms 8.0 Product Documentation
GetDirectAltRowInfo Method (ISheetStyleModel)
Example 


Index of the alternating row style to get; must be between 0 and AltRowCount-1
Style set (StyleInfo object) to use for composing the styles; if destInfo is null then a new StyleInfo should be created and used
Gets the specified alternating row style in the model.
Syntax
'Declaration
 
Function GetDirectAltRowInfo( _
   ByVal index As Integer, _
   ByVal destInfo As StyleInfo _
) As StyleInfo
'Usage
 
Dim instance As ISheetStyleModel
Dim index As Integer
Dim destInfo As StyleInfo
Dim value As StyleInfo
 
value = instance.GetDirectAltRowInfo(index, destInfo)
StyleInfo GetDirectAltRowInfo( 
   int index,
   StyleInfo destInfo
)

Parameters

index
Index of the alternating row style to get; must be between 0 and AltRowCount-1
destInfo
Style set (StyleInfo object) to use for composing the styles; if destInfo is null then a new StyleInfo should be created and used

Return Value

StyleInfo object containing the style information
Remarks

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

GetDirectInfo returns the style properties that have been set for the specified cell, column, or row directly and does not return any settings that ar set for higher levels (like the entire model), while GetCompositeInfo returns the style properties "composed" or "merged" into one StyleInfo object that contains all the settings to paint and edit the cell, column, or row, including inherited settings.

Example
This example sets and returns the alternating row information for the cell.
FarPoint.Win.Spread.Model.ISheetStyleModel ssm;
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle("StyleData");
FarPoint.Win.Spread.StyleInfo si;
ssm = (FarPoint.Win.Spread.Model.ISheetStyleModel)fpSpread1.ActiveSheet.Models.Style;
ns.BackColor = Color.LightBlue;
fpSpread1.NamedStyles.Add(ns);
ssm.SetDirectAltRowInfo(0, ns);
si = ssm.GetDirectAltRowInfo(0, null);
label1.Text = "The backcolor of the first alternating row is " + si.BackColor.ToString();
Dim ssm As FarPoint.Win.Spread.Model.ISheetStyleModel
Dim ns As New FarPoint.Win.Spread.NamedStyle("StyleData")
Dim si As FarPoint.Win.Spread.StyleInfo
ssm = FpSpread1.ActiveSheet.Models.Style
ns.BackColor = Color.LightBlue
FpSpread1.NamedStyles.Add(ns)
ssm.SetDirectAltRowInfo(0, ns)
si = ssm.GetDirectAltRowInfo(0, Nothing)
Label1.Text = "The backcolor of the first alternating row is " & si.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

Reference

ISheetStyleModel Interface
ISheetStyleModel Members

 

 


Copyright © GrapeCity, inc. All rights reserved.