views:

74

answers:

2

I'd like to have a normal table to look like RadGrids, is there an easy way I can use the RadGrid styles (keeping theming in mind)?

+3  A: 

Using a tool like Firebug, you can inspect the table generated by RadGrid.

The example shown on this page gives the following results:

<table class="rgMasterTable rgClipCells">
   <thead>
     <th class="rgHeader" scope="col">header</th>
   </thead>
   <tbody>
      <td class="rgRow">cell</td>
   </tbody>
</table>

Adding the classes stated here to your own table should copy the style from the rad grid.

Jan Jongboom
I've added your snippet as is to my page, but it does not seem to work. Any other ideas?
Marcel
Not without a link to your page. The classnames might differ per version.
Jan Jongboom
I had to add a div with another style, see my own answer in this thread. Thanks for pointing me in the right direction.
Marcel
A: 

I have been playing with this, and it seems you need to wrap the table in div(s) with certain styles - maybe due to themes? Maybe I'm still missing something, but this is the only way I could get it to work.

<div class="RadGrid RadGrid_Sunset">
    <table class="rgMasterTable rgClipCells">
        <thead>
            <th class="rgHeader" scope="col">header</th>
        </thead>
        <tbody>
            <td class="rgRow">cell</td>
        </tbody>
    </table>
</div>
Marcel