how do i get cell object at ExitingEditMode
<
="http://www.w3.org/1999/xhtml">
head runat
="server">
>
="text/javascript">
WebDataGridView_ExitingEditMode(webDataGrid, evntArgs)
{
var
cell = evntArgs.getCell();
alert(cell);
alert(cell.get_value());
args.set_cancel(
false
);
}
</script
</
head
body
="100%">
/>
MouseClick="Single"
html
Sai,
At this point, I think it might be best for you to contact developer support to really dig into this issue and figure out why you're getting null and undefined. I've used your handlers but don't have a problem accessing the value.
regards,
David
hI David
Still i am having the problem
CustomExitingEditMode(sender, eventArgs)
alert(eventArgs.get_displayText()); // undefined is displayed
Hi,
So another thing you might try is eventArgs.get_displayText(). This will return the text that is in the editor as its exiting edit mode. You could try using that for validation and then cancel the exiting event if it is not a valid value.
hi David
Thanks for your reply. Actually my requirement is. I want to validate the user enterd value before leaveing cell. based on conditions i may cancle the event. I am not able to get cell object using getCell() method. But i am get the object in ExitedEditMode event. how can i get the cell value before cell leaving
I tried out code similar to yours. I used your event handler code and edit mode actions in the add row. I was not getting null for cell. Also, in your event handler, you have args.set_cancel(false); but it should be evntArgs.set_cancel(false); to match the parameter name. Also, if you're always setting it to false, you don't really need to call that line since it will be false by default. One thing to note is that when the event is fired, the value of the cell will not have been updated yet, so even when you find the cell, its text/value will still be empty.
Maybe try attaching a more in depth sample here or get in contact with developer support to dig into this issue of you getting null.
David Young