How do I get Gridview to render THEAD?

Andrew Bullock picture Andrew Bullock · Nov 21, 2008 · Viewed 58.6k times · Source

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

Phil Jenkins picture Phil Jenkins · Nov 21, 2008

This should do it:

gv.HeaderRow.TableSection = TableRowSection.TableHeader;