I've seen a few threads but nothing specific, so I will ask again: I am using the WebDataGrid and the RubberBlack style. In addition to using this style, I also want to CENTER my data columns. There should be an align property for a column but obviously there isn't.
So... when using a theme how can I center or otherwise manipulate the style (such as setting a column bold or setting a column to center-align)?
/Tom
Hey Tom,
This should be possible by setting the CssClass property of the column in question. You'll want to define your custom class like follows. It needs the selectors in order to override what is set in the classes of the StyleSet.
tbody > tr > td.custom { font-weight: bold; text-align: center; color : Blue; }
.customHeader
{ font-weight: bold; text-align: center;
}
This will only affect the cells. To affect the footer and header, the css class for those parts of the column will need to be set.
<ig:BoundDataField DataFieldName="Name" Key="Name" CssClass="custom"> <Header Text="Name" CssClass="customHeader" /> </ig:BoundDataField>
The customHeader class doesn't need selectors since our .igg_HeaderCaption doesn't use them. Hopefully, this gets you rolling with styling your columns.
regards,
David Young
But this is also aligning my filter row (if filter is applied in grid).
I want to stay my filter alignment whatever it is. Is there any idea how to do that?