How to force asp.net GridView control to wrap first row within <thead> </thead> tags
Posted
by burak ozdogan
on Stack Overflow
See other posts from Stack Overflow
or by burak ozdogan
Published on 2010-03-15T12:17:42Z
Indexed on
2010/03/15
12:19 UTC
Read the original article
Hit count: 286
Hi,
I want to use Christian Bach's tableSorter client-side table sorting jQuery plugin with my asp.Net GridView control.
But the problem is, in the documentation it writes:
tablesorter works on standard HTML tables. You must include THEAD and TBODY tags:
And unfortunately asp.net renders my GridView only with tags and header row stays within as the 1st row.
I have tried:
dgvRate.HeaderRow.TableSection = TableRowSection.TableHeader;
after calling .DataBind();
It only helped to have <TH></TH>
within the header . But still everything is inside <tbody>
Can I accomplish this, I mean moving my 1st row from <tbody></tbody>
to <thead></thead>
?
I do not want to add it manually on PreRender stage; I am sure this could be handled much simpler, isn't it?
thanks
© Stack Overflow or respective owner