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)?
views:
74answers:
2
+2
Q:
How can I style normal html tables (or ASP tables) like the rest of the RadGrid in my website?
+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
2010-05-21 10:56:44
I've added your snippet as is to my page, but it does not seem to work. Any other ideas?
Marcel
2010-05-21 11:05:54
Not without a link to your page. The classnames might differ per version.
Jan Jongboom
2010-05-21 11:47:27
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
2010-05-21 22:38:20
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
2010-05-21 22:36:51