This is a migrated thread and some comments may be shown as answers.

Grid .HeaderStyle.CssClass

1 Answer 152 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tim R
Top achievements
Rank 1
Tim R asked on 27 Mar 2009, 04:37 PM
Using version 2008.1.619.20

If I do this in codebehind:

MyRadGrid.HeaderStyle.CssClass="MyHeaderStyle" 

shouldn't I see something like the following in the generated HTML at runtime?
<thead>
  <tr>
<th scope="col" class="MyHeaderStyle">

What I'm seeing is this:

<thead>
  <tr>
   <th scope="col" class="GridHeader_Default">

Thanks

1 Answer, 1 is accepted

Sort by
0
Todd Anglin
Top achievements
Rank 2
answered on 27 Mar 2009, 06:24 PM
Hello Tim-

The reason you're seeing that result is due to the way the ASP.NET and Telerik skinning mechanism works. When you have a skin applied to your Grid (which you do by default), it overrides local CssClassName values. To use local CssClass values, you must turn-off skinning by setting the Skin property to "" (empty string). 

If you want to customize the appearance of your Grid header and keep skinning turned-on, check out these articles in the online help docs for guidance on customizing RadGrid skins:


Hope that helps!
-Todd
Tags
Grid
Asked by
Tim R
Top achievements
Rank 1
Answers by
Todd Anglin
Top achievements
Rank 2
Share this question
or