3.0 beta 2

Cell edit esc key event

When you are editing the value in a cell, you have the option of pressing the esc key. Pressing esc will cancel the edit and replace the edited text with the previous value. I assume that some event is raised when esc is pressed. I need to override that event to add some validation. Does anyone know what event is being triggered by the esc key?
Brandon Murphy
September 13,
Currently the esc key event is cancelled and not exposed outside of the edit box. You'll have to modify editing code to fix this -

/source/lib/templates/imagetext.js, lines 116, 353
Alex (ActiveWidgets)
September 14,
Alex,

I ran into this issue with my AW application when I used the grid in a pseudo-popup window that the user exits by hitting the Escape key. Users were reporting that changes they made in the grid weren't being saved properly, and it took me a while to track it down to the Escape key issue. If they changed the text in a cell and then hit Escape, the content of the cell would be reverted before my update routine was called and so the changes would be lost. I have temporarily worked around this issue by changing the hardcoded references to key code 27 to an invalid key code in the aw.js runtime file, but it's an ugly hack. Do you have plans to make this controllable in a more elegant way?
Randall Severy
March 23,
Yes, I think in the future this action should be exposed as cancelEdit() method and somehow mapped to Esc key via edit controller.
Alex (ActiveWidgets)
March 27,
Alex, any chance this will get into the 2.5 release? Or will I need to apply the same hack to 2.5?
Randall Severy
November 27,
This is implemented in AW 2.5. The cancelCellEdit() method is called from onKeyEscape event, so you can prevent it if you cancel event handler -

obj.onKeyEscape = function(event){
    event.returnValue = false;
    return true; // prevent cancelCellEdit() 
}
Alex (ActiveWidgets)
November 28,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.