Hi can anyone tell me how to get the new value of a cell in ExitingEditMode client event of WebDataGrid?
I mean, when i change the data in a cell and hit Enter Key, it fires the ExitingEditMode event but I see that if I do e.getCell().get_value() it returns the previous value of the data in the cell but not the changed value.
I need to do this so that I can define an ExitingEditMode event handler for Row Adding and do some necessary validations before adding the row and cancel if the validations fail.
Can you please provide me with a sample for this.
Hi nancy1985,
Thank you for posting in the community.
You can use the event argument passed to the ExitingEditMode handler in order to access the "new" value for the edited cell as such:
eventArgs.get_displayText();
Please let me know if this helps.
Please do not hesitate to contact me if you need further assistance regarding this matter.
How to get the old value in the webdatagrid at exitingEdit event?
I used
function
WebDataGrid1_CellEditing_ExitingEditMode(sender, eventArgs) {
var OldValue = eventArgs.get_cell().get_value(); // or eventArgs.get_item().get_cell().get_value();
alert(OldValue);
}