Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

ASP.NET: Append thead and tbody tags to a GridView

From Wiki

Revision as of 11:54, 28 April 2010 by ca8msm (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Summary: Append thead and tbody tags to a GridView

When a GridView renders it content to a table, it doesn't render any thead or tbody tags. To force this to happen, you can use the following code on the load of your page:

  1. GridView1.HeaderRow.TableSection = TableRowSection.TableHeader

This Hack is part of the ASP.NET Hacks collection

741 Rating: 2.2/5 (35 votes cast)