-
31 Jan 2012 9:44 PM #1
Answered: Grid with RowEditor, How to get the cancel event
Answered: Grid with RowEditor, How to get the cancel event
Hi
I have a Grid with Row Editor. I have disabled the on row Editor on Row click using "beforeedit " event.
and I have action column where edit and delete functionality is coded.
In my requirement , I wanted to disabled/hide the edit and delete image on Edit image click. I have done this.
Now My query is , i want to enabled / show the image on Rodeditor's cancel button click. But I am not able to catch the cancel event.
I have tried following ways
Code:myGrid.on('canceledit', function(grid,eOpts ) { alert('Test'); });Code:rowEditing.on('canceledit', function(grid,eOpts ) { alert('Test'); });But no success. Can you please tell me how do I get the Row Editors Cancel event so that I can enable/ show Action column images.Code:rowEditing.on({ scope: this, canceledit: function(roweditor, changes, record, rowIndex) { alert("user clicked the cancel button"); } });
-
Best Answer Posted by vietits
Which version do you use? With 4.0.2a, Ext.grid.plugin.RowEditing won't fire canceledit event.
With 4.0.7 or higher, it will fire canceledit event, so you can capture it from your plugin by using listeners config or addListener.
With 4.1.0-beta-1 or higher, you can catch canceledit event from you grid, but with 4.0.7, you can't because the grid won't relay this event.Code:.... plugins: [{ ptype: 'rowediting', autoCancel: false, listeners: { canceledit: function(){ console.log('canceledit is fired'); } } }] ...
-
31 Jan 2012 10:46 PM #2
Which version do you use? With 4.0.2a, Ext.grid.plugin.RowEditing won't fire canceledit event.
With 4.0.7 or higher, it will fire canceledit event, so you can capture it from your plugin by using listeners config or addListener.
With 4.1.0-beta-1 or higher, you can catch canceledit event from you grid, but with 4.0.7, you can't because the grid won't relay this event.Code:.... plugins: [{ ptype: 'rowediting', autoCancel: false, listeners: { canceledit: function(){ console.log('canceledit is fired'); } } }] ...
-
1 Feb 2012 9:34 PM #3
Thank you so much. Yes I was using 4.0.2a . now upgraded to 4.0.7 and Its working fine.
Thanks once again


Reply With Quote