In C# how do I still show the headers of a gridview, even with the data source is empty.
I am not auto generating the columns as they are all predefined.
C
ASP.Net 4.0 added the boolean ShowHeaderWhenEmpty property.
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.showheaderwhenempty.aspx
Note: the headers will not appear unless DataBind() is called with something other than null.
GridView1.DataSource = New List(Of String)
GridView1.DataBind()