PDA

View Full Version : How to use disabledCls style in 'actioncolumn'?



f.baron
27 Jan 2014, 1:34 AM
Hi!
I'm having problems in understanding the usage of disabledCls config in action column components. In particular i saw that it's not used by component's methods like 'defautRenderer' or 'enable/disable', so the disabled element always use the 'x-item-disabled' class.

It cold by a bug? How to set a custom style to disabled action columns items?


Thank you.

mdnaveed42
27 Jan 2014, 5:38 AM
Hi,

If you specify "disabledCls" then it overwrites the default class "x-item-disabled".

Try this code and you will see the action column header text color changed,


CSS:
.text-color-change {
color: red;
}

Action column config:

xtype:'actioncolumn',
width:50,
disabled: true,
text: 'Action Column',
disabledCls: "text-color-change"





Thanks,
Md Naveed

f.baron
28 Jan 2014, 1:39 AM
It doesn't work, it always uses the x-item-disabled style.

f.baron
28 Jan 2014, 1:55 AM
A suitable solution for now is:



// CSS
.mygrid .x-item-disabled

// MYGRID JS
...
...
{
xtype: 'actioncolumn',
tdCls: 'mygrid'
}
...
...


But disablesCls should be more elegant :P