sita k

sita k

  • NA
  • 43
  • 52k

Need to set dropdownlist based on gridview selection

Nov 26 2013 6:11 PM
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)