Dropdown List in Datagrid
-
I have dropdown list in everyrow of datagrid. I would like to know if and how I can capture the SelectedIndex Changed event of the dropdown list in the datagrid. Basically, I want to do some kidn of functionality whenever a user selects a different value in the dropdown list box in the datagrid and hence require to capture the SelectedIndex Changed event Any has a clue abt how to do this? Thanks Sujatha
-
I have dropdown list in everyrow of datagrid. I would like to know if and how I can capture the SelectedIndex Changed event of the dropdown list in the datagrid. Basically, I want to do some kidn of functionality whenever a user selects a different value in the dropdown list box in the datagrid and hence require to capture the SelectedIndex Changed event Any has a clue abt how to do this? Thanks Sujatha
This can be done in by adding the delegate to OnSelectedIndexChange event in the aspx page to point to the method that handles the functionality as below : In .aspx In c# codebehind : public void ddlSolverFlag_SelectedIndexChanged(object sender, System.EventArgs e) { DropDownList ddlFlag = (System.Web.UI.WebControls.DropDownList)sender; this.lblSolverFlags.Text += "solver_flag : " +ddlFlag.SelectedValue; this.lblSolverFlags.Visible=true; }