Could you please advice on how to control user input. Does a databound grid cell have kind of ‘numeric’ property or I have to write code to validate the input. Then what is the best event to do that. I want to allow the user to enter into the cell only numbers with one decimal point in the range from -99.9 to 99.9 and do not allow to type letters at all.
I set the cell type of double and use gdbg.Binder.InternalColumns[“colname”].StyleInfo.Format = "#0.0";
It still allows user to enter many decimal points and type letters. What is the best way to fix that?
Thanks in advance
ADAdministrator Syncfusion Team September 1, 2004 07:05 AM
To do chacter by character validation, you will have to use the CurrentCellValidateString event. There, check e.Text to make sure it is valid, and set e.Cancel = true if it is not. To get teh row and column of the cell being validated, use grid.CurrentCell.RowIndex/COlindex.