Results 1 to 4 of 4

Thread: Saki? - cellActions don't work after grid reconfigure

  1. #1
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    532

    Default Saki? - cellActions don't work after grid reconfigure

    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

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Location
    Austin, Texas
    Posts
    4

    Default

    You might have better luck posting directly in the thread for that extension.

  3. #3

    Default same problems but with rowactions

    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

  4. #4
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Tried everything?

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

    Code:
    	,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

    Code:
    	,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);
            },

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •