Hi Alejandro,
To avoid this from happening, you can handle the TableControlCurrentCellValidateString event of the grid. This event gets fired for each keystroke; so you can cancel this event by setting e.Cancel to true when the entered number is greater than the limit. Below is the code snippet.
private void gridGroupingControl1_TableControlCurrentCellValidateString(object sender, GridTableControlCurrentCellValidateStringEventArgs e)
{
double d;
double.TryParse(e.Inner.Text, System.Globalization.NumberStyles.Any, null, out d);
if(d > 999999)
e.Inner.Cancel = true;
}
FYI, you can use this GridNumericUpDownCellModel.AcceptAlphaKeys property, this lets you specify whether the NumericUpDown cell should accept Alpha keys.
GridNumericUpDownCellModel cm = (GridNumericUpDownCellModel) this.gridGroupingControl1.TableModel.CellModels["NumericUpDown"];
cm.AcceptAlphaKeys = false;
Regards,
Rajagopal