FlexGrid for WinForms
SetCellStyle(Int32,String,CellStyle) Method



Row index.
Column name.
The CellStyle to associate with the cell.
Assigns a custom CellStyle to a cell.
Syntax
'Declaration
 
Public Overloads Sub SetCellStyle( _
   ByVal row As Integer, _
   ByVal colName As String, _
   ByVal newStyle As CellStyle _
) 
'Usage
 
Dim instance As C1FlexGridBase
Dim row As Integer
Dim colName As String
Dim newStyle As CellStyle
 
instance.SetCellStyle(row, colName, newStyle)
public void SetCellStyle( 
   int row,
   string colName,
   CellStyle newStyle
)
public:
void SetCellStyle( 
   int row,
   String^ colName,
   CellStyle^ newStyle
) 

Parameters

row
Row index.
colName
Column name.
newStyle
The CellStyle to associate with the cell.
Remarks

The SetCellStyle(Int32,String,CellStyle) method is useful if you want to assign a new style to a single cell. You can also reset the cell style by setting it to null (Nothing, in VB).

To apply a custom cell style to an entire row or column, set the row or column's RowCol.Style properties.

To apply a custom style to a range cells, use a CellRange object. For example:

CellRange rg = _flex.GetCellRange(3, 3, 10, 10); rg.Style = _flex.Styles["MyRangeStyle"];
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

Reference

C1FlexGridBase Class
C1FlexGridBase Members
Overload List

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Send Feedback