PDA

View Full Version : Add classNames to grid headers



nicora
13 Sep 2007, 8:16 PM
I have searched around for this, but haven't found any answers. Is there a way to add classes to the element formatting the headers' style? I'm not talking about the contents of the header, but rather the header element itself. What I'm trying to do, for instance, is iterate through certain columns and add a class name to change their appearance.

Thanks in advance!

nicora
13 Sep 2007, 8:36 PM
to be a little more clear, can I get a handle on the headers dom element without an event object?

Animal
13 Sep 2007, 10:59 PM
Columns by default have class "x-grid-hd-0-n" where n is the column number starting from zero.

Just use Firebug: http://i131.photobucket.com/albums/p286/TimeTrialAnimal/FiebugHTML.jpg

nicora
14 Sep 2007, 7:30 AM
ah yes, selectors for the win!