On my web grid I have set the CssClass property for many of the style options:
<HeaderStyleDefault Font-Bold="true" ForeColor="Black" BackColor="White" CssClass="GridHeaderStyle"></HeaderStyleDefault><RowStyleDefault CssClass="GridRowStyle"> <Padding Left="3px" /> <BorderDetails StyleLeft="Solid" WidthLeft="1px" WidthTop="0px" /></RowStyleDefault><RowAlternateStyleDefault CssClass="GridAlternateRowStyle"> <Padding Left="3px" /> <BorderDetails ColorLeft="233, 233, 247" ColorTop="233, 233, 247" /></RowAlternateStyleDefault><RowSelectorStyleDefault BackColor="White"></RowSelectorStyleDefault><GroupByRowStyleDefault CssClass="GroupByHeaderStyle"></GroupByRowStyleDefault><SelectedRowStyleDefault CssClass="SelectedRowStyle"></SelectedRowStyleDefault>
However, the value of the class attribute when it is rendered is:
class="ig_9f4ef124_r4 GridHeaderStyle "
Why is it doing this?
Hello,
UltraWebGrid has preset logic to skin its components - rows, headers, footers, etc. Even though you explicitly set CssClass, the grid still needs to apply its own class before that, otherwise it will not be able to use its skin property. The HTML "class" attribute allows multiple Css classes separated by spaces, so your class will still be applied after the built-in grid class. So in essence, ig_9f4ef124_r4 is actually the built in grid class for the particular element.
Do you experience any problems with that?
My style classes are not being applied. All other styles from the same sheet are being set properly on other page elements.
I will check everything again, and if I cannot find why it is happening, I'll repost. Thanks.