Hi,
I checked ActionColumn definition and found this:
Code:
processEvent: function (name, e, grid, rowIndex, colIndex) {
var m = e.getTarget().className.match(this.actionIdRe),
item, fn;
if (m && (item = this.items[parseInt(m[1], 10)])) {
if (name == 'click') {
(fn = item.handler || this.handler) && fn.call(item.scope || this.scope || this, grid, rowIndex, colIndex, item, e);
} else if ((name == 'mousedown') && (item.stopSelection !== false)) {
return false;
}
}
return Ext.grid.ActionColumn.superclass.processEvent.apply(this, arguments);
}
Looks like there is nothing to check if handler returns false or something. So we need to overwrite it:
Code:
Ext.override(Ext.grid.ActionColumn, {
processEvent : function(name, e, grid, rowIndex, colIndex){
var m = e.getTarget().className.match(this.actionIdRe),
item, fn;
if (m && (item = this.items[parseInt(m[1], 10)])) {
if (name == 'click') {
fn = item.handler || this.handler;
if(fn){
if(fn.call(item.scope || this.scope || this, grid, rowIndex, colIndex, item, e) === false){
return false;
}
}
} else if ((name == 'mousedown') && (item.stopSelection !== false)) {
return false;
}
}
return Ext.grid.ActionColumn.superclass.processEvent.apply(this, arguments);
}
});
or
Code:
{xtype: 'actioncolumn',
....
processEvent : function(name, e, grid, rowIndex, colIndex){
var m = e.getTarget().className.match(this.actionIdRe),
item, fn;
if (m && (item = this.items[parseInt(m[1], 10)])) {
if (name == 'click') {
fn = item.handler || this.handler;
if(fn){
if(fn.call(item.scope || this.scope || this, grid, rowIndex, colIndex, item, e) === false){
return false;
}
}
} else if ((name == 'mousedown') && (item.stopSelection !== false)) {
return false;
}
}
return Ext.grid.ActionColumn.superclass.processEvent.apply(this, arguments);
}
}
And 'return false' would cancel your click event.
Regards.