C# – How to get Gridview to render THEAD

.netasp.netc++gridview

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.

Best Solution

This should do it:

gv.HeaderRow.TableSection = TableRowSection.TableHeader;