How to control column data type error message

I have a grid that has a column defined as type Int16. The tab event correctly informs me if a have a non-Int16 value in this cell with the error message: "2147483648 is not a valid value for Int16.". Is there a way to customize this error message to make it read something like: "Quantity is an invalid number."? Thank you.

2 Replies

AD Administrator Syncfusion Team October 24, 2005 03:25 PM UTC

Here is a KB discussing one to handle this. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=26 This KB discusses actually validating the value yourself. If you just want to react to a bad value, then in a GridDataBoundGrid, you can catch the grid.ValidationFailed event. There, you can set grid.CurrentCell.ErrorMessage to be the string you want displayed. In a GridControl, instead of grid.ValidateFailed, you catch grid.CurrentCellMoveFailed and set grid.CurrentCell.ErrorMessage to be the string you want displayed.


JU Justin October 24, 2005 05:53 PM UTC

Thank you Clay - this worked perfectly! Justin

Loader.
Up arrow icon