Click here to Skip to main content
15,906,947 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have gridview with two dropdown as follows
ASP.NET
<asp:GridView runat="server" ID="folderLoadCodeGV" AutoGenerateColumns="false"
            EnableDelete="true" EmptyDataText="Please Select" Width="100%"
            ShowHeaderWhenEmpty="true" onrowdatabound="folderLoadCodeGV_RowDataBound"
            onrowinserting="folderLoadCodeGV_RowInserting">
            <Columns>
                <asp:TemplateField HeaderText="ValName">
                    <ItemTemplate>
                        <asp:DropDownList ID="ddl1" runat="server"
                            Width="120px"  DataSource='<%#GetCategoryCode()%>' >
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Define Compare Source">
                    <ItemTemplate>
                        <asp:DropDownList DropDownStyle="DropDown" ID="ddl2" runat="server"
                            Width="120px" IsRequired="true">

                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>

</asp:GridView>


I want to add row dynamically on button click and want datasource of dynamic dropdown from database.I am able to add rows dynamically but dropdown is not binding.
Please help.
Thx in advanced
Posted
Updated 17-May-12 6:04am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900