Hello,in my WebDataGrid I want to let the user add new records. The first column is the key column and the values entered into this field have to be unique. So I wanted to use the CellEditing_ExitedEditMode event.
Here I want to validate the entered value and if the entered value is already in that grid I tried to use "eventArgs.set_cancel(true)". I know this property is available in eventArgs of the CellEditing_EnteringEditMode event and also the method to set that value.
see screenshot2
Unfortunately a similar property and the method are not available in the CellEditing_ExitedEditMode as you can see in screenshot 2
Why is that property and method not available? Has this a special reason? If I can prohibit editing a cell I think it should also be possible to cancel editing. How can I do that now?
OK, may be that I use the wrong event. Now I'm trying to use the ..-exiting event. But here is the problem that I can not get the value of the cell. May be that I'm wrong again. Please let me know how I do that correctly.
I expected that a similar code can also be used in the -exiting function. But I get no value from the cell. Also using "get_text" does not give a result. How can I figure out what the user has typed in at this time?
Hi martinn,
It turns out you're correct that this behavior does exist, but you are just using the wrong event. We have four events four editing: entering, entered, exiting, and exited. The -ed events happen after the cell has already entered or exited edit mode. It really is just a notification. In order to cancel the event, you need to handle the -ing events. The method on the event args will be available in the exitingEditMode event. Let us know if you need any other help.
regards,David Young