Friday, February 20, 2009

Show Header for GridView For NULL DataSource


We have to desing the gridview header in the Table and put it inside the
EmptyDataTemplate of the gridview as given below.


<asp:GridView ID="GridView2" runat="server" CssClass="th">
<EmptyDataTemplate>
<table>
<tbody>
<tr>
<td>
<b>Name</b></td>
</tr>
</tbody>
</table>
</EmptyDataTemplate>
</asp:GridView>


No comments: