Andrew Bullock Andrew Bullock - 8 months ago 47
ASP.NET (C#) Question

How do I get Gridview to render THEAD?

How do I get the

GridView
control to render the
<thead>
<tbody>
tags? I know
.UseAccessibleHeaders
makes it put
<th>
instead of
<td>
, but I cant get the
<thead>
to appear.

Answer Source

This should do it...

gv.HeaderRow.TableSection = TableRowSection.TableHeader;