EditorCell Demo illustrates the usage of different editor controls as celltypes in grid cells. You will learn how to place integer, double, percentage textboxes into cells.
Given below is an image of the sample.
Integer Textbox Cell
To have Integer TextBox cells, you should Register cell model as IntegerTextBox. Also you should set the cell type as IntegerTextBox.
RegisterCellModel.GridCellType(this.gridControl1, CustomCellTypes.IntegerTextBox); gridControl1[rowIndex, colIndex].CellType = CustomCellTypes.IntegerTextBox.ToString();
Double TextBox cell
To have Double TextBox cells, you should Register cell model as DoubleTextBox. Also you should set the cell type as DoubleTextBox.
RegisterCellModel.GridCellType(this.gridControl1, CustomCellTypes.DoubleTextBox); gridControl1[rowIndex, colIndex].CellType = CustomCellTypes.DoubleTextBox.ToString();
Percentage Textbox Cell
To have Percentage TextBox cells, you should Register cell model as PercentageTextBox. Also you should set the cell type as PercentageTextBox.
RegisterCellModel.GridCellType(this.gridControl1, CustomCellTypes.PercentTextBox); gridControl1[rowIndex, colIndex].CellType = CustomCellTypes.PercentTextBox.ToString();