hi
i have a dropdown list in gridview at editItemtemplate and i want connect it to database ,
means when i click on edit button on gridview the dropdown list fill with data of datasource,so which event and which coe i use to connect it to datasource without useing of sqldatasource object!
i write the follow code but it give error ?
con.Open();
DropDownList drop = new DropDownList();
drop = (DropDownList)GridView2.Rows[k].Cells[4].FindControl("DropDownList2");
string str = "select distinct(kind_book)from book";
DataSet set = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(str, con);
drop.DataTextField = "kind_book";
drop.DataValueField = "kind_book";
drop.DataSource = set;
drop.DataBind();
con.Close()
please send resolve to my email:sepede123@yahoo.com