-->

Thursday, May 29, 2014

Nested Gridview Example in ASP.NET

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>

Read other related articles

Also read other articles

© Copyright 2013 Computer Programming | All Right Reserved