Title: How to set the "Escape" key to UNDO and Leaving Cell editing in DataGrid ? Post by: Jonny on May 21, 2015, 10:13:15 PM Dear All,
Base on Demo -> Cell Editing in DataGrid: http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem= Is there any possibility to set "ESCAPE" key or any key to UNDO changes and leave the cell editing? Please help me if anyone expert on this.. Thanks in advance. Regards, JONNY Title: Re: How to set the "Escape" key to UNDO and Leaving Cell editing in DataGrid ? Post by: stworthy on May 22, 2015, 05:25:30 PM Bind the 'keydown' event on the editing box. When pressing the ESC key, cancel the current editing action. Please refer to the following code.
Code: $('#dg').datagrid({ Title: Re: How to set the "Escape" key to UNDO and Leaving Cell editing in DataGrid ? Post by: Jonny on May 22, 2015, 09:43:00 PM Hello Stworthy,
Thank you for giving sample code, it works ! :) Regards, Jonny |