oneditcell - stage 2 not fired when esc key is pressed

oneditCell - stage 2 is fired when i click some other cell or row besides the cell being edited.
However it is not activated when Esc key on the keyboard is keyed although the edited cell is being closed. How do i fire an event when the esc key is keyed? The reason i want to do that is so that if a user does not input data into all the columns required into a new row, then when he press the esc key, the new row will be deleted.

This is know issue of keyboard navigation. “onEditCell” event is not called when you close editor with “Esc” button. We will not fix it because of backward compatibility. As a workaround you can use “onKeyPress” event … onkeypress

my data failed to load after i added the below line. how come?

mygrid.attachEvent(“onKeyPress”, esckey);


Does your browser returns any error? Please check if esckey function is defined on your page

i manage to get the event to work, but now if i edit a cell, nothing comes out when i type! only if i defined the action for individual code for onkeypress event, then only the action will be done. how do i pass back to normal keyboard function if the key press is not included in specific actions that i want?

Check if you returns true from onEditCell event handler

do i need to use oneditcell event?

if i don’t attach the onkeypress event, then everything is fine, eventhough i don’t attach the oneditcell event.