Reputation: 1852
I want to add and remove the cls of the action column in the grid dynamically.
Can any one help me in doing this?
Upvotes: 1
Views: 742
Reputation: 5712
The easiest way to do this is to not use an actioncolumn actually. Use a normal column and render the image you want and then have a hander for the column click, here is code actually used in my application for a single column:
{
width: 25,
renderer: function(value, metaData, record){
if(record.get("node_type") == "CONDITION")
return "<img src=\"magnifier.png\"/>";
return "";
},
listeners: {
click: function(grid, htmlRow, index, columnIndex, mouseEvent, record){
//do something here
}
}
}
Upvotes: 1