I'd like to specify the css class that the Tapestry Grid component assigns to the TH and TD tags in a column. Is this possible?
And the long answer is yes!
If the class attributes, mentioned in Steve Enyon's answer, are not enough you can decorate the DOM after the grid has rendered via a mixin. I have created a GridDecorator mixin here which can decorate TR and TD elements based on the value in the cell / row. In my example I add onclick and style attributes to the DOM. You could easily tweak the mixin to decorate TH elements with a GridHeaderCellDecorator and add class attributes where necessary.
My 2p, I think that the Grid is long overdue for an overhaul and that customisations like this should be much easier than they are.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With