ExtJS 4.
I have grid and editor for it. Editor have listener. How to get access to grid from listener?
var grid = Ext.create('Ext.grid.Panel',{
plugins: [Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 2,
pluginId: 'cellplugin'
})],
columns: [
{
header: 'Name',
dataIndex: 'name',
editor: {
xtype: 'textfield',
listeners: {
specialkey: function(field, e) {
if (e.getKey() == e.ENTER) {
!!!NEED TO ACCESS GRID HERE, FOR EXAMPLE IN VARIABLE!!!
var grid = SOME?CODE?;
}
}
}
}},
// ...
],
// ...
});
And I can merge editor not from this grid. So this command need to be universal.
1 Answer