Hide action column icon with getClass in Extjs 4

I have 3 icons in the action columns, Edit, Delete, Publish for each row in a grid. Now I want to hide the publication icon and change it to disable the icon under certain conditions (my records come from mysql db).

+4
source share
2 answers

Here is an example from my project.

Using the getClass property of the actioncolumn element to do this. To hide it, return the class name "x-hide-display".

xtype: 'actioncolumn', items: [ { getClass: function(v, metadata, r, rowIndex, colIndex, store) { // hide this action if row data flag indicates it is not deletable if(r.data.deletable == false) { return "x-hide-display"; } }, handler: function(view, rowIndex, colIndex, item, e, record, row) { //do something }, icon: 'icons/delete.png' } ] ] 
+5
source

I had to face a similar situation, but my demand changed, so there was no time to implement the assistance that some people offered.

You can check it out on

http://www.sencha.com/forum/showthread.php?149763-How-to-Change-action-column-icon-dynamically

0
source

All Articles