Category / Section
How to Restrict Alphabetical Characters Cell in WinForms GridControl?
Restrict the alphabetical characters
By default, the NumericUpDown cell can allow entry of both the alphabets and number characters. In order to restrict only the number characters, the NumericUpDown can be customized using the AcceptAlphaKeys property by deriving model from GridNumericUpDownCellModel class.
gridControl1[4, 4].CellType = GridCellTypeName.NumericUpDown;
GridNumericUpDownCellModel model = gridControl1.CellModels[GridCellTypeName.NumericUpDown] as GridNumericUpDownCellModel;
model.AcceptAlphaKeys = false;gridControl1(4, 4).CellType = GridCellTypeName.NumericUpDown
Dim model As GridNumericUpDownCellModel = TryCast(gridControl1.CellModels(GridCellTypeName.NumericUpDown), GridNumericUpDownCellModel)
model.AcceptAlphaKeys = FalseThe
Screenshot below displays the alphabet restriction of the cell in GridControl.

Samples: