Syncfusion.Grid.Windows
Example 


CellModels Property (GridModel)

Gets cell types for the grid.
Syntax
'Declaration
 
<BrowsableAttribute(False)>
<DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)>
Public ReadOnly Property CellModels As GridCellModelCollection
'Usage
 
Dim instance As GridModel
Dim value As GridCellModelCollection
 
value = instance.CellModels
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public GridCellModelCollection CellModels {get;}
Example
This example shows how to use the CellModels property.
//Specify the cell model to be added in the grid model with cell type name.
this.gridControl1.CellModels.Add("SampleCellType", new GridHeaderCellModel(this.gridControl1.Model));
// Set the added cell type to the cell.
 this.gridControl1.Model.ColStyles[1].CellType = "SampleCellType";
'Specify the cell model to be added in the grid model with cell type name.
Me.gridControl1.Model.CellModels.Add("SampleCellType", New GridHeaderCellModel(Me.gridControl1.Model))
'Set the added cell type to the cell
Me.gridControl1.Model.ColStyles(1).CellType = "SampleCellType"
AssemblyVersion

Syncfusion.Grid.Windows: 17.1460.0.47

See Also