Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
200
CssClass names not set properly
posted

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?

 

Parents
No Data
Reply
  • 28464
    posted

    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? 

Children