imohamed
2014-03-20T20:41:09Z
I have a grid that only accepts numbers. It uses the RequestEdit event and sets the eTextEditOpt = igTextEditNumberOnly.
I want to give users the ability to delete the values in the cells but if a populated cell is cleared, I get the following pop up.
I can't seem to catch this in the BeforeCommit or AfterCommit Events. Is there a way I can surpress this error and allow users to clear out cells.
imohamed attached the following image(s):
Igor/10Tec
2014-03-21T14:30:04Z
By default, iGrid tries to convert the entered text to the corresponding value of the current cell value data type. If your cell stores an integer value, and you try to save an empty string in it, you get a conversion error. Something similar to the result of the expression like CInt("").

You can process this special case in the BeforeCommitEdit event. Check the lConvErr argument, and if it's not zero, assign the required value to save in the cell to the vNewValue argument (see also the SilentValidation property).

This process is described well in the help file. See, for instance, the topic dedicated to the BeforeCommitEdit event.