To change the drop down value form the other dropdown selected index change.
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
GridViewRow row = (GridViewRow)((sender) as Control).NamingContainer;
DropDownList dr = (DropDownList)sender;
//DropDownList dr = (DropDownList)GridView1.FindControl("DropDownList1");
DropDownList dropdown2 =(DropDownList)row.FindControl("DropDownList2");
string condition = dr.SelectedValue.ToString();
SelectSubCategory(condition,dropdown2);//a function for filling the child gridview
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment