PDA

View Full Version : How to set Icon for each action column in a grid under certain conditions?



Sufala A S
25 Jun 2013, 4:29 AM
Sir/ Madam,
How to set Icon for each action column in a grid under certain conditions?i have seen in your thread
this.columns[0].items[0].icon='../../moduleResources/reports/repform/faxicon1.png';
but i have doubt abount column[0].items[0] is it index of action column or any other?

mitchellsimoens
27 Jun 2013, 4:50 AM
Check out the example: http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.grid.ActionColumn

It uses the getClass config on the 2nd icon of the action column which you could return nothing to not show an icon.

Sufala A S
28 Jun 2013, 1:07 AM
this example is to set Tooltip .
please help me to set Icon for each action column.

Sufala A S
28 Jun 2013, 1:32 AM
Hai sir,

in this
getClass: function(v, meta, rec) { // Or return a class from a function if (rec.get('change') < 0) { this.items[1].tooltip = 'Do not buy!'; return 'alert-col'; } else { this.items[1].tooltip = 'Buy stock'; return 'buy-col'; } please explain

this.items[1].tooltip = 'Do not buy!';what is items[1] is it index?

mitchellsimoens
28 Jun 2013, 4:40 AM
getClass method you return a CSS class