gridview Nested-GridView


A Nested-GridView is a GridView control inside the grid row of the parent GridView control.


  • <asp:GridView ID="gvParent" runat="server"></asp:GridView>
  • <asp:GridView ID="gvChild" runat="server"></asp:GridView>


gvParentIt is a parent gridview control which contains a child gridview like gvChild control and other controls in gridview row like Labels, Buttons etc.
gvChildIt is a child gridview control that can also contain some other controls like in parent gridview. It will be nested in gvParent gridview control.


Parent gridview can be bind using a simple DataBind function like gvParent.DataBind();. And for binding Child gridview, you have to bind it in OnRowDataBound event of parent gridview.