Spread for ASP.NET 9.0 Product Documentation
SetDirectInfo 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
Source StyleInfo object that has style information
Sets the direct style information for the specified cell, column, row, or model default.
Syntax
'Declaration
 
Public Overridable Sub SetDirectInfo( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal info As StyleInfo _
) 
'Usage
 
Dim instance As BaseSheetStyleModel
Dim row As Integer
Dim column As Integer
Dim info As StyleInfo
 
instance.SetDirectInfo(row, column, info)
public virtual void SetDirectInfo( 
   int row,
   int column,
   StyleInfo info
)

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
info
Source StyleInfo object that has style information
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 set the direct settings for an object. Use the GetDirectInfo methods to get the direct settings for a specified 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.

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);
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)
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

BaseSheetStyleModel Class
BaseSheetStyleModel Members
GetDirectInfo Method
SetDirectAltRowInfo Method

 

 


Copyright © GrapeCity, inc. All rights reserved.