I am working with this code and trying to implement a add row feature using footertemplate, but nothing in the footer row is showing. Because the gridview is nested and a panel is used for layout, I don't know how to get the footertemplate content to show. At this stage I just want anything to show below the nested gridview / panel.
The context:
1.There is a customer gridview
2.When users select a row, child gridview shows.
3.The child contains all orders of the selected customer.
4.I want to be able to show some controls below the last order in the expanded panel, so a new order can be added.
5.Where do I need to place the footertemplate, so the controls show in the panel.
<asp:GridView ID="gvCustomers" runat="server" AutoGenerateColumns="false" CssClass="Grid" DataKeyNames="CustomerID" OnRowDataBound="OnRowDataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<img alt = "" style="cursor: pointer" src="images/plus.png" />
<asp:Panel ID="pnlOrders" runat="server" Style="display: none">
<asp:GridView ID="gvOrders" runat="server" AutoGenerateColumns="false" CssClass = "ChildGrid">
<Columns> <asp:BoundField ItemStyle-Width="150px" DataField="OrderId" HeaderText="Order Id" />
<asp:BoundField ItemStyle-Width="150px" DataField="OrderDate" HeaderText="Date" />
</Columns>
</asp:GridView>
</asp:Panel>
</ItemTemplate>
<footertemplate>
<asp:Button Text="Insert" CommandName="Insert" CausesValidation="true" runat="server" ID="btInsert" />
<asp:Button Text="Cancel" CommandName="Cancel" CausesValidation="false" runat="server" ID="btCancel" />
<asp:Label runat="server" Text="ggggggg">ddd</asp:Label>
</footertemplate>
</asp:TemplateField>
<asp:BoundField ItemStyle-Width="150px" DataField="ContactName" HeaderText="Contact Name" />
<asp:BoundField ItemStyle-Width="150px" DataField="City" HeaderText="City" />
</Columns>
</asp:GridView>