I have a Window that contains a databound ListGrid and an "Add New" button. When the button is clicked its onClick handler executes grid.starteditingnew(); and then disables the button.
If the user closes the Window that contains the ListGrid it executes a method on the grid to re-enable the button, and I want to cancel the new record edit in progress.
grid.cancelEditing() does not appear to do this however I have noticed that pressing the escape key does cancel an insert that is in progress.
I assume that I need to fire an event to send an ESC key press event to the grid? Is that the way this is usually accomplished?
If there is a better way please let me know, and if this is the right way to do it is there an existing ESC event already made or is it necessary to send a keypress event and pass the ESC key in it.
Thanks
If the user closes the Window that contains the ListGrid it executes a method on the grid to re-enable the button, and I want to cancel the new record edit in progress.
grid.cancelEditing() does not appear to do this however I have noticed that pressing the escape key does cancel an insert that is in progress.
I assume that I need to fire an event to send an ESC key press event to the grid? Is that the way this is usually accomplished?
If there is a better way please let me know, and if this is the right way to do it is there an existing ESC event already made or is it necessary to send a keypress event and pass the ESC key in it.
Thanks
Comment