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


row
Row index of the cell in the model, or -1 to specify an entire column or the model default
column
Column index of the cell in the model, or -1 to specify an entire row or the model default
destInfo
Destination StyleInfo object for getting the style; if null, then a new StyleInfo should be created and used

Glossary Item Box

Gets the direct style information for the specified cell, column, row, or model default.

Syntax

Visual Basic (Declaration) 
Public Overridable Function GetDirectInfo( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal destInfo As StyleInfo _
) As StyleInfo
Visual Basic (Usage)Copy Code
Dim instance As BaseSheetStyleModel
Dim row As Integer
Dim column As Integer
Dim destInfo As StyleInfo
Dim value As StyleInfo
 
value = instance.GetDirectInfo(row, column, destInfo)
C# 
public virtual StyleInfo GetDirectInfo( 
   int row,
   int column,
   StyleInfo destInfo
)

Parameters

row
Row index of the cell in the model, or -1 to specify an entire column or the model default
column
Column index of the cell in the model, or -1 to specify an entire row or the model default
destInfo
Destination StyleInfo object for getting the style; if null, then a new StyleInfo should be created and used

Return Value

StyleInfo object containing the direct style (format) settings

Remarks

This implementation does nothing and returns null.

"Direct" in the style model means "not composite" or "not inherited." This method, 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.

Alternating row styles are not included in this method. GetDirectAltRowInfo returns the alternating row style information.

If destInfo is null, then a new StyleInfo object is created and used.

In terms of precedence of styles, direct cell styles override direct row styles, which override direct column styles, which override model default styles.

In terms of allowed values, for a direct row style, use -1 for the entire column; for a direct column style, use -1 for the entire row; and for a model default style, use -1 for all the rows and columns.

Example

This example illustrates the use of this member by returning the direct style information for the cell.
C#Copy Code
FarPoint.Win.Spread.Model.BaseSheetStyleModel styleModel;
FarPoint.Win.Spread.StyleInfo sInfo = new FarPoint.Win.Spread.StyleInfo();
styleModel = (FarPoint.Win.Spread.Model.BaseSheetStyleModel)fpSpread1.ActiveSheet.Models.Style;
styleModel.GetDirectInfo(0, 2, sInfo);
Visual BasicCopy Code
Dim styleModel As FarPoint.Win.Spread.Model.BaseSheetStyleModel
Dim sInfo As New FarPoint.Win.Spread.StyleInfo()
styleModel = FpSpread1.ActiveSheet.Models.Style
styleModel.GetDirectInfo(0, 2, 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.