Friday, October 5, 2012

show headers when gridview is empty asp net

Here .NET 4.0 added a new property called ShowHeaderWhenEmpty in the grid view. So you can make it true in the gridview tag.

 <asp:GridView ID="gridAccounts" runat="server" ShowHeaderWhenEmpty="true" >

But in the other versions you need to add a blank row manually if no data found.

No comments: