Syncfusion.Grid.Windows
Example 


Syncfusion.Windows.Forms.Grid Namespace > GridControl Class > ChangeCells Method : ChangeCells(GridRangeInfo,GridStyleInfo[]) Method

ChangeCells(GridRangeInfo,GridStyleInfo[]) Method

See GridModel.ChangeCells in the GridModel class for information.
Syntax
'Declaration
 
Public Overloads Function ChangeCells( _
   ByVal range As GridRangeInfo, _
   ByVal cellsInfo() As GridStyleInfo _
) As Boolean
'Usage
 
Dim instance As GridControl
Dim range As GridRangeInfo
Dim cellsInfo() As GridStyleInfo
Dim value As Boolean
 
value = instance.ChangeCells(range, cellsInfo)
public bool ChangeCells( 
   GridRangeInfo range,
   GridStyleInfo[] cellsInfo
)

Parameters

range
cellsInfo
Example
This example shows how to change the cell values with the specified range and array of specific style values.
// Defining the new cell styles.
GridStyleInfo newStyle = new GridStyleInfo();
newStyle.CellType = GridCellTypeName.ComboBox;
// Setting the styles of range of cells to new style.
this.gridControl1.ChangeCells(GridRangeInfo.Rows(1, 2), newStyle, Syncfusion.Styles.StyleModifyType.Changes);
' Defining the new cell styles.
Dim newStyle As GridStyleInfo = New GridStyleInfo
newStyle.CellType = GridCellTypeName.ComboBox
' Setting the styles of range of cells to new style.
Me.gridControl1.ChangeCells(GridRangeInfo.Rows(1, 2), newStyle, Syncfusion.Styles.StyleModifyType.Changes)
AssemblyVersion

Syncfusion.Grid.Windows: 17.3460.0.26

See Also