0

I am new into ext js I am using Ext js 4.1 for Create treeGrid Panel also we use different render function for ech column. Then How to apply CSS to Selected Row into Treepanel?

Yotam Omer
  • 15,310
  • 11
  • 62
  • 65
Sudarshan
  • 350
  • 4
  • 11

1 Answers1

0

The selected raw css class is x-grid-row-selected, which you can override:

.x-grid-row-selected {
    background-color: red;
}

Within your renderer you can apply a css class using metadata:

renderer: function( aValue, aMetaData, aRecord )
{
    aMetaData.tdCls = 'some-of-your-own';
}
Izhaki
  • 23,372
  • 9
  • 69
  • 107
  • As a general rule, it's usually not a good idea to override existing CSS classes if you can add your own instead. It's hard to guarantee that your changes won't bleed over into other components. The second option is better; adding your own classes via `tdCls` gives you more flexibility and allows you to selectively apply styles where you need them. – Eric Sep 05 '12 at 13:01