Actually u r not getting my point.. When the gridview is loaded the empty data template becomes invisible right? Later the gridview which has a footer the the columns becomes visible which also has add link button and that gets fired.. In case i want to add multiple contact details it is creating problem.
My gridview aspx code is as below:
<asp:GridView ID="GVContact" runat="server" AutoGenerateColumns="False"
ShowFooter="True" Width="500px" Font-Names="Tahoma" Font-Size="8.25pt"
ForeColor="Gray"
onrowupdating="GVContact_RowUpdating"
onrowcommand="GVContact_RowCommand"
onrowcancelingedit="GVContact_RowCancelingEdit"
onrowediting="GVContact_RowEditing">
<EmptyDataTemplate>
<table cellspacing="0" rules="all" style="font-family: Tahoma;
font-size: 8.25pt; width: 550px; border-collapse: collapse;">
<tr style="background-color: White;">
<th>ID</th>
<th scope="col">
Contact Name
</th>
<th scope="col">
Contact Email ID
</th>
<th scope="col">
Contact Mobile
</th>
<th scope="col">
Contact Status
</th>
</tr>
<tr>
<td> <asp:Label ID="lblContactID" runat="server"></asp:Label></td>
<td>
<asp:TextBox ID="txtcontact" CssClass="TextBoxStyle" runat="server"></asp:TextBox>
</td>
<td>
<asp:TextBox ID="txtCemail" CssClass="TextBoxStyle" runat="server"></asp:TextBox>
</td>
<td>
<asp:TextBox ID="txtCmobile" CssClass="TextBoxStyle" runat="server"></asp:TextBox>
</td>
<td>
<asp:CheckBox ID="chkstatus" Checked="true" runat="server" />
<asp:LinkButton ID="lnkaddContact" Font-Underline="false" CommandName="AddContactPerson" Font-Bold="true" ForeColor="Gray" runat="server">add</asp:LinkButton>
</td>
</tr>
</table>
</EmptyDataTemplate>
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="lblContactID" runat="server" Text='<%#Eval("ContactPersonID") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Contact Name">
<ItemTemplate>
<asp:Label ID="lblcontact" Text='<%#Eval("ContactName") %>' CssClass="TextBoxStyle" runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtContactName" Text='<%#Eval("ContactName") %>' runat="server" CssClass="GridItemStyle"
Width="90px"></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtcontact" CssClass="TextBoxStyle" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Email ID">
<ItemTemplate>
<asp:Label ID="lblemail" CssClass="TextBoxStyle" runat="server" Text='<%#Eval("ContactEmailID") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtemail" runat="server" Text='<%#Eval("ContactEmailID") %>' CssClass="GridItemStyle" Width="90px"></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtCemail" CssClass="TextBoxStyle" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Mobile">
<ItemTemplate>
<asp:Label ID="lblmobile" Text='<%#Eval("ContactMobile") %>' CssClass="TextBoxStyle" runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtmob1" runat="server" Text='<%#Eval("ContactMobile") %>' CssClass="GridItemStyle" Width="90px"></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtCmobile" CssClass="TextBoxStyle" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Status">
<ItemTemplate>
<asp:Label ID="lblstatus" CssClass="TextBoxStyle" runat="server" Text='<%#Eval("ContactStatus") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBox ID="chkstatus" Checked="true" runat="server" />
</EditItemTemplate>
<FooterTemplate>
<asp:CheckBox ID="chkstatus" Checked="true" runat="server" />
<%-- <asp:Button ID="btnadd" Width="50px" Font-Bold="true" runat="server" Text="add" CssClass="TextBoxStyle" />--%>
<asp:LinkButton ID="lnkadd" Font-Underline="false" CommandName="AddContact" Font-Bold="true" ForeColor="Gray" runat="server">add</asp:LinkButton>
</FooterTemplate>
</asp:TemplateField>
<asp:CommandField HeaderText="Edit" ControlStyle-Font-Underline="false"
ControlStyle-CssClass="TextBoxStyle" ShowEditButton="True" >
<ControlStyle CssClass="TextBoxStyle" Font-Underline="False" />
</asp:CommandField>
</Columns>
<HeaderStyle BorderColor="#666666" BorderStyle="Solid" BorderWidth="2px" />
</asp:GridView>