PDA

View Full Version : Saki? - cellActions don't work after grid reconfigure



Eric24
6 Jun 2008, 9:19 AM
I've tried everything I can think of, and reviewed every relevant post I could find, but no luck making the cellActions plugin work after reconfiguring the grid. The reconfigure call works as expected and the grid refreshes just fine with the new cm and ds, but my cellActions icons are missing from the "new" grid. If I go back to the "original" configuration (via another call to reconfigure), the cellAction icons show up again. So that seems to tell me that the plugin has applied itself to the cm or the ds, not the grid, but if that's the case, it still makes no sense (both cm's contain the cellactions configuration on the appropriate column definitions). I'm sure there's something simple I'm missing--any ideas?

Thanks!
Eric

brian.moeskau
9 Jun 2008, 2:02 PM
You might have better luck posting directly in the thread for that extension.

nazextjs
18 Oct 2008, 9:20 PM
I have the same problem where after grid.reconfigure there is not row actions icons available.
There is no error whatsoever and the grid renders ok

Animal
18 Oct 2008, 10:13 PM
Tried everything?

Pretty simple to read the code and see what it does, and add a workaround.



,init:function(grid) {
this.grid = grid;
// grid.on({scope:this, render:this.onRenderGrid});
grid.afterRender = grid.afterRender.createSequence(this.onRenderGrid, this);

var cm = this.grid.getColumnModel();
Ext.each(cm.config, function(c, idx) {
if('object' === typeof c.cellActions) {
c.origRenderer = cm.getRenderer(idx);
c.renderer = this.renderActions.createDelegate(this);
}
}, this);
},


So maybe something like



,init:function(grid) {
this.grid = grid;
// grid.on({scope:this, render:this.onRenderGrid});
grid.afterRender = grid.afterRender.createSequence(this.onRenderGrid, this);
grid.reconfigure = this.reconfigure.createDelegate(this);
this.initColModel(this.grid.getColumnModel());
},

reconfigure: function(store, colModel) {
this.initColModel(colModel);
Ext.grid.GridPanel.prototype.reconfigure.apply(this.grid, arguments);
},

initColModel: function(cm) {
Ext.each(cm.config, function(c, idx) {
if('object' === typeof c.cellActions) {
c.origRenderer = cm.getRenderer(idx);
c.renderer = this.renderActions.createDelegate(this);
}
}, this);
},