views:

229

answers:

1

I have to validate a couple of fields in the CA grid every time a record is updated/added. The grid is used in the callback mode. What i cannot figure out how to do is cancel the callback if a cell is invalid. I am trying to do this 'onBeforeUpdate' event of the grid. I can call set_cancel(true) to cancel the update. But this will change the row mode from edit to display and i will lose all entered data. What i am trying to do is leave the row in the edit mode when any cell in that row is invalid. One of the things i have thought about but haven't done yet is attempting to change RunningMode to Client, validate the record, and set the RunningMode back to Callback when i'm ready to submit? Any suggestions are very appreciated. Thanks!

+1  A: 

Turns out there is a method on the cancel event that allows to leave the row in the edit mode.

eventArgs.set_continue(true);
Sergey