1
Reply

Need to set dropdownlist based on gridview selection

Ask a question
sita k

sita k

10y
762
1
Hello Everyone, I would like to know how to set dropdownlist values after selecting the gridview row. I tried all the possibilities but it doesn't set to the selected value instead it always points to the initial item. Below is my piece of code. //ddlid.SelectedItem.Value = grdEmployee.SelectedRow.Cells[1].ToString(); // ddlname.SelectedItem.Value = grdEmployee.SelectedRow.Cells[3].ToString(); // txtSal.Text = grdEmployee.SelectedRow.Cells[4].Text; Thanks in advance.

Answers (1)