Results 1 to 6 of 6

Thread: How to use cellActions on my solution?

  1. #1
    Sencha Premium Member
    Join Date
    May 2011
    Posts
    67

    Default Answered: How to use cellActions on my solution?

    How to use cellActions on my solution?

    I need a record.field? What is it?

    Code:
    this.cellActions = new Ext.ux.grid.CellActions({
     listeners:{
     action:function(grid, record, action, value) {
     //Ext.ux.Toast.msg('Event: action', 'You have clicked: <b>{0}</b>, action: <b>{1}</b>', value, action);
     Ext.MessageBox.alert('Event: action','You have clicked: <b>'+ record.id +'</b>, action: <b>'+ action +'</b>');
      
    //handleNoDate(record.id); 
     }
     ,beforeaction:function() {
     //Ext.ux.Toast.msg('Event: beforeaction', 'You can cancel the action by returning false from this event handler.');
     }
     }
     ,callbacks:{
     'icon-undo':function(grid, record, action, value) {
     //Ext.ux.Toast.msg('Callback: icon-undo', 'You have clicked: <b>{0}</b>, action: <b>{1}</b>', value, action);
     }
     }
     ,align:'left'
     });
    cell-actions.jpg

  2. No, no. dataIndex is not a property of record. It is 5th argument of the action/event call. See the source.

  3. #2
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Answers
    512

    Default

    I've never tested this extension with contemporary version of Ext - it worked with 2.x but I'm not sure how it's with new versions.
    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. #3
    Sencha Premium Member
    Join Date
    May 2011
    Posts
    67

    Default

    Quote Originally Posted by jsakalos View Post
    I've never tested this extension with contemporary version of Ext - it worked with 2.x but I'm not sure how it's with new versions.
    I seams to work fine with Ext JS 3.4.0.

    I just need to know how to get field name.

  5. #4
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Answers
    512

    Default

    I see. dataIndex is the field name. It is passed as one of the arguments to both event and callback functions.
    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. #5
    Sencha Premium Member
    Join Date
    May 2011
    Posts
    67

    Default

    Quote Originally Posted by jsakalos View Post
    I see. dataIndex is the field name. It is passed as one of the arguments to both event and callback functions.
    record.dataIndex returns undefined.

  7. #6
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Answers
    512

    Default

    No, no. dataIndex is not a property of record. It is 5th argument of the action/event call. See the source.
    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


Posting Permissions

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