Spread for ASP.NET 8.0 Product Documentation
GetDirectInfo Method (BaseSheetStyleModel)
Example 


Row index of the cell in the model, or -1 to specify an entire column or the model default
Column index of the cell in the model, or -1 to specify an entire row or the model default
Destination StyleInfo object for getting the style; if null, then a new StyleInfo is created and used
Gets the direct style information for the specified cell, column, row, or model default.
Syntax
'Declaration
 
Public Overridable Function GetDirectInfo( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal destInfo As StyleInfo _
) As StyleInfo
'Usage
 
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)
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 is created and used

Return Value

This implementation does nothing and returns null.
Remarks

Spread uses a composite of style settings to paint the spreadsheet. For example, for a cell, the component looks at the style settings for the column and row for the cell, and the cell's own settings.

Use this method to get the direct settings for the specified object. Use the SetDirectInfo methods to set the direct settings for an object.

Direct cell styles override direct row styles, which override direct column styles, which override model default styles. Direct row styles use -1 for the column, direct column styles use -1 for the row, and model default styles use -1 for both the row and column.

To return the composite information for an object, use the GetCompositeInfo method.

This implementation does nothing and returns null.

Example
This example sets up the cell type for the style.
FarPoint.Web.Spread.Model.BaseSheetStyleModel bs;
FarPoint.Web.Spread.StyleInfo si = new FarPoint.Web.Spread.StyleInfo();
si.CellType = new FarPoint.Web.Spread.CheckBoxCellType();
bs = (FarPoint.Web.Spread.Model.BaseSheetStyleModel)FpSpread1.ActiveSheetView.StyleModel;
bs.SetDirectInfo(0, 0, si);

FarPoint.Web.Spread.StyleInfo gdi;
gdi = bs.GetDirectInfo(-1, -1, si);
Response.Write("The cell type for the style is " + Convert.ToString(gdi.CellType));
Dim bs As FarPoint.Web.Spread.Model.BaseSheetStyleModel
Dim si As New FarPoint.Web.Spread.StyleInfo
si.CellType = New FarPoint.Web.Spread.CheckBoxCellType
bs = FpSpread1.ActiveSheetView.StyleModel
bs.SetDirectInfo(0, 0, si)

Dim gdi As FarPoint.Web.Spread.StyleInfo
gdi = bs.GetDirectInfo(-1, -1, si)
Response.Write("The cell type for the style is " & Convert.ToString(gdi.CellType))
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

Reference

BaseSheetStyleModel Class
BaseSheetStyleModel Members
GetCompositeInfo Method
GetDirectAltRowInfo Method
SetDirectInfo Method

 

 


Copyright © GrapeCity, inc. All rights reserved.