Page 11 of 28 FirstFirst ... 91011121321 ... LastLast
Results 101 to 110 of 275

Thread: Grid CellActions Plugin

  1. #101
    Ext JS Premium Member
    Join Date
    Jul 2008
    Posts
    52
    Vote Rating
    1
      0  

    Default Reconfigure grid and the cellAction are not working

    Hi, is it possible that the plugin is not working as expected when the column model is updated.
    I wrote a class (based on the autogrid class) which reconfigures the columnModel itself after finishing the ajax.
    The cellActions are not working then.
    I saw that another user had the same problem but i saw no reply to uts message.

    Thanks in advance.
    Robert

  2. #102
    Ext JS Premium Member
    Join Date
    Jul 2008
    Posts
    52
    Vote Rating
    1
      0  

    Default cellAction after grid (cm) reconfiguration

    Hi, Sorry.
    I know that i posted already my problem but i thought it would be good to have the description from eric24 also associated with my description.

    Best regards

    Robert

    Quote Originally Posted by Eric24 View Post
    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

    PS - It has been brought to my attention that a plug-in is only called on the initial create (or render?) of the "host" component, which explains the effect I'm seeing. I suppose it might be possible to call cellActions' init method after I call reconfigure on the grid, but: 1) that might cause leaks in cellActions, if it wasn't written to be init'able twice; and 2) it seems like a better approach for a grid plug-in (which has a reconfigure option) would be for it to support the reconfiguring (in the sense that it should either listen for the reconfigure event from the grid or possibly override the reconfigure option--or provide one of its own--that would allow the plug-in to "re-init" after the grid reconfigure.

  3. #103
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Vote Rating
    403
      0  

    Default

    I also have a reconfigurable grid and I needed to code a special plugin support into it. Sorry I won't publish this grid nor its code fragments. I personally don't use cell actions with it but row actions work very well with that support. Plugins config is delivered from the server as part of the metaData.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  4. #104
    Touch Premium Member
    Join Date
    Dec 2007
    Posts
    110
    Vote Rating
    1
      0  

    Default Too much recursion

    Saki,

    This plugin is fantastic. I do have one issue I hope you can help me with.

    I have a grid inside of a tab panel using cell actions, and it works great. If I close the panel that contains the grid, and try and reopen the panel, I get the following errors:

    Code:
    too much recursion
    [Break on this error] Ext={version:"2.1"};window["undefined"]=...|new Date()).getTime()-this.getTime())};
    ext-base.js (line 9)
    too much recursion
    [Break on this error] var val = c.origRenderer(value, cell, record, row, col, store);
    CellAction.js (line 231)
    When I comment out the plugin line on the grid, it works fine. Here are some short snippets that I hope will help.

    Code:
    if(!cellActions)
      cellActions = new Ext.ux.grid.CellActions({
    	//id: 'cellActionsID',
    	listeners:{
    		action:function(grid, record, action, value) {
    
    		}
            }
      });
    
    ......
    
    if(!attendanceByMonthGrid){
      attendanceByMonthGrid = new Ext.grid.GridPanel({
        //id: 'attendanceByMonthGrid1',
        title: 'Attendance by Month',
        store: dsAttendanceByMonth,
        cm: new Ext.grid.ColumnModel(cmGridAttendanceByMonth),
        plugins: cellActions,
        enableNoGroups: false,
        autoHeight: true
      });
    }
    
    ......
    
    return new Ext.TabPanel({
      activeTab: 0,
      defaults: {
        hideMode: 'offsets'
      },
      height: 720,
      items: [{
        xtype: 'panel',
        title: 'Attendance by Month',
        layout: 'form',
        labelWidth: 185,
        items: [attendanceByMonthMap,attendanceByMonthGrid]
      },{
        ...
      }
    });
    I can put together a simple test app if needed, but I am sure it is something simple. These errors only occur when I close the tab and then reopen it.


    Thanks!

  5. #105
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Vote Rating
    403
      0  

    Default

    Could be that sth is not destroyed properly. A showcase is needed in this case...
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  6. #106
    Ext User
    Join Date
    Aug 2008
    Posts
    7
    Vote Rating
    0
      0  

    Default CellAction question.

    Hello,

    Thank you for the great plugin. I have a question. Is it possible to change the icon in the cell when the user hits the icon. I want something like a disabled button after user clicks it. How to do that?

    One more thing. The doc for the plugin says that callback takes 7 parameters like action event but in the code the callback is invoked with 6 parameters:

    Code:
     
    //call callback if any 
    if(this.callbacks && 'function' === typeof this.callbacks[action]) { 
    this.callbacks[action](this.grid, record, action, value, row.rowIndex, col);
    }
    There is no dataIndex variable. Is it ok. I mean it works but is dataIndex an important variable? What I can use it for?

    Thanks

  7. #107
    Ext User
    Join Date
    Jun 2008
    Posts
    4
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by Lucian View Post
    Lucian here...this is what I want, thank you very much. I also added support for mouseover/mouseout events by modifying the main file. Anybody interested?...

    Although its quite old of a post bt I urgently require this. Can u post this solution

  8. #108
    Ext User
    Join Date
    Jun 2008
    Posts
    4
    Vote Rating
    0
      0  

    Default

    I need mouseover/mouseout events for cellActions. Can anyone post it.

  9. #109
    Ext User
    Join Date
    Aug 2008
    Posts
    7
    Vote Rating
    0
      0  

    Default

    I need mouseover/mouseout events for cellActions. Can anyone post it.
    You will find the solution in this thread. You need to change actionEvent from default 'click' in CellAction to the event you want or something like that, but the exact solution is in this thread on previous pages.

  10. #110
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Vote Rating
    403
      0  

    Default

    @Krzysztof, icon effects can be achieved by css if you don't need any other logic behind it. The callback signature was bug - I've fixed it now. Thank you for pointing out.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


Page 11 of 28 FirstFirst ... 91011121321 ... LastLast

Posting Permissions

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