Posted on: 9/21/2014 7:13:21 PM | Views : 444

i have created cascading drop down in grid view,
and filling  cascading drop down value from another table "table1"
here is  the code taking id and name  from table1 and showing it into "table2" 
protected void GV_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { if ((e.Row.RowState & DataControlRowState.Edit) > 0) { SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandText = "SelectCategory"; //**** where selectcategory is "select * from table1" cmd.CommandType = CommandType.StoredProcedure; DataSet ds = new DataSet(); SqlDataAdapter oDa = new SqlDataAdapter(cmd.CommandText, con); DropDownList Category = (DropDownList)e.Row.FindControl("Category"); oDa.Fill(ds); Category.DataSource = ds; Category.DataTextField = "Name"; Category.DataValueField = "I ...

Go to the complete details ...