Nested Gridview Example in ASP.NET

A gridview with some items and another gridview structure

<form id="form1" runat="server">
    <div>
        <asp:GridView ID="GridView1" runat="server">
        <Columns>
        <asp:TemplateField>
        
        <ItemTemplate>
            <asp:TextBox ID="TextBox1" runat="server" Text ='<%# Eval("database field") %>' />
        
        </ItemTemplate>
         <ItemTemplate>
             <asp:GridView ID="GridView2" runat="server">
             <Columns>
             <asp:TemplateField>
                 
        <ItemTemplate>
            <asp:DropDownList ID="DropDownList1" runat="server">
            </asp:DropDownList>
        
        </ItemTemplate>
             
             </asp:TemplateField>
             
             </Columns>
             </asp:GridView>
        
        </ItemTemplate>
        
        
        </asp:TemplateField>
        
        </Columns>
        </asp:GridView>
    </div>
    </form>

Comments

Popular posts from this blog

difference between structure and union in C Language

Difference between Linear search and Binary Search in c language

Difference between static and dynamic websites