View Full Version : Grid with RowEditor, How to get the cancel event

31 Jan 2012, 9:44 PM
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

myGrid.on('canceledit', function(grid,eOpts )

rowEditing.on('canceledit', function(grid,eOpts )

scope: this,
canceledit: function(roweditor, changes, record, rowIndex) {
alert("user clicked the cancel button");

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.

31 Jan 2012, 10:46 PM
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.

plugins: [{
ptype: 'rowediting',
autoCancel: false,
listeners: {
canceledit: function(){
console.log('canceledit is fired');

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.

1 Feb 2012, 9:34 PM
Thank you so much. Yes I was using 4.0.2a . now upgraded to 4.0.7 and Its working fine.

Thanks once again