I have a datagrid with autogenerate = false . which is populated based on the previous datagrid . Now , in the second grid I have a text box and insert command to insert in to the grid . But I want to show the grid even its empty so that I can use the insert functionality to add new records
Also you can use EmptyDataTemplate, like this:
<asp:GridView ID="GridView1" runat="server">
<EmptyDataTemplate>
There is no data.
</EmptyDataTemplate>
</asp:GridView>
navinbabu
ASKER
Hello reza_rad ,
thanks but can I make it visible only up on the first grid index selection
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1">
<EmptyDataTemplate>
Empty table. click on this button to insert new record <asp:Button ID="Button1" runat="server" Text="Add" onclick="Button1_Click" />
</EmptyDataTemplate>
</asp:GridView>
navinbabu
ASKER
when we use emptydata template it is displayed even before its populated as I said this is populated based up on the selection on first grid .