0

What is the best way to still show column headings on a GridView that doesn't get any records when using LINQDataSource?

Brian David Berman
  • 7,514
  • 26
  • 77
  • 144

2 Answers2

2

Matt Berseth has an article in which he subclasses GridView and implements this behavior.

Matthew Jones
  • 25,644
  • 17
  • 102
  • 155
1

The easiest way I can think of off the top of my head would be to fake it in the EmptyDataTemplate.

Past that you could add a new header row one of the DataBound events.

rball
  • 6,925
  • 7
  • 49
  • 77