Hii howto override itemclick in gridpanel on ExtJS4 ? I have gridpanel with alias tableA like this :
Ext.define('AM.test.TableA', {
extend: 'Ext.grid.Panel',
alias: 'widget.tableA',
initComponent: function() {
// tableA configurations
this.callParent(arguments);
}
});
And my tableA controller like this :
Ext.define('AM.test.TableAController', {
extend: 'Ext.app.Controller',
init: function() {
this.control({
'tableA': {
itemclick: this.tableSelection
}
});
},
tableSelection: function(grid, record) {
console.log('tableA selection');
}
}
With this configuration, when i click some row in tableA i get message "tableA selection" in console. Then, i want to extends tableA to tableB like this:
Ext.define('AM.test.TableB', {
extend: 'AM.test.TableA',
alias: 'widget.tableB'
});
And my tableB controller look like this :
Ext.define('AM.test.TableBController', {
extend: 'Ext.app.Controller',
init: function() {
this.control({
'tableB': {
itemclick: this.tableBSelection
}
});
},
tableBSelection: function(grid, record) {
console.log('tableB selection');
}
}
With this, when i click some row in tableB. I get message 'tableB selection' and then 'tableA selection' like this in my console dialog:
tableB selection
tableA selection
Btw, what must i do to override itemclick from 'tableA' in 'tableB' ? I don't want to call 'itemclick' on tableA.