1. #1
    Ext User
    Join Date
    Jul 2010
    Posts
    20
    Vote Rating
    0
    sunil_vakotar is on a distinguished road

      0  

    Default Hide icon in action column for particular row

    Hide icon in action column for particular row


    Hi,

    i used action column in my grid.
    i have put 3 icon now for each row..

    but now the requirement is I display icon in action columns as per the JSON response for that grid.

    Please provide some workaround ASAP.

    Thanks

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    96
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Write a getClass method for the action item that returns 'x-hide-display' when the icon should not be visible.

  3. #3
    Sencha User
    Join Date
    Nov 2012
    Posts
    6
    Vote Rating
    -1
    tharahan is an unknown quantity at this point

      -1  

    Default


    Try something like
    Code:
    menuDisabled: true, sortable: false, xtype: 'actioncolumn', flex : 2, items: [{ icon : 'resources/images/tradeCancel.png', tooltip: 'Remove', handler: function(grid, rowIndex, colIndex) { var store = Ext.StoreManager.get('TradeAllocations'); var rec = store.getAt(rowIndex); if(rec.data.tradeId == "") { rowEditing.cancelEdit(); store.removeAt(rowIndex); } }, getClass: function(v, meta, rec) { if(rec.data.tradeId != "") { return 'x-hide-display'; } } } ] }

Similar Threads

  1. View Action Hide Whens
    By aidancooper in forum Ext.nd for Notes/Domino
    Replies: 1
    Last Post: 20 Jan 2009, 4:45 PM
  2. Datagrid: How to hide the column header row?
    By ben_dog in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 30 Nov 2008, 2:42 AM
  3. Icon-only Toolbar using Action-Objects
    By lastChill in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 17 Jul 2008, 12:00 AM
  4. [Solved]change column color of single row(grid column names row)
    By amey7p in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 14 Feb 2008, 3:52 AM

Thread Participants: 2