Click here to Skip to main content
15,041,025 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to bind the drop downlist in gridview using dataset
<asp:DropDownList ID="ddlCategories" runat="server"  SelectedValue='<%#Eval("CategoryName")%>'  AppendDataBoundItems="true" AutoPostBack="true" DataTextField='<%#Eval("CategoryName")%>' DataValueField='<%#Eval("CategoryName")%>'>
Updated 15-Dec-10 22:54pm

What about google? I got this in 1st page of google search.

DropDownList Inside GridView[^]
On a RowDataBound Event.

Find a DropDownList Control first.<clear>
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    if (e.Row.RowType == DataControlRowType.DataRow)
        DropDownList ddl = (DropDownList)e.Row.FindControl("ddlCategories");
        if (ddl != null)
            ddl.DataSource == //Set DataSource Here;

Please vote and Accept Answer if it Helped.

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