FlexGrid for WinForms
StyleNew Property (CellRange)
Example 



Gets or sets the style used to display every cell in the range, creating a new style if necessary.
Syntax
'Declaration
 
Public ReadOnly Property StyleNew As CellStyle
'Usage
 
Dim instance As CellRange
Dim value As CellStyle
 
value = instance.StyleNew
public CellStyle StyleNew {get;}
public:
property CellStyle^ StyleNew {
   CellStyle^ get();
}
Remarks
This property never returns null. If the range does not have a style assigned to it, a new style will be created automatically.
Example
The code below creates a CellRange structure and uses it to apply a custom style to the entire range.
// create a cell range
CellRange rg = _flex.GetCellRange(1, 1, 5, 5);
            
// make sure range is red
rg.StyleNew.BackColor = Color.Red;
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

CellRange Structure
CellRange Members

 

 


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

Send Feedback