How to get selected value of datagrid dropdownlist
hi
i have drop down list in mydatagrid. and i loaded my database values in that and if i select any value from that dropdownlist it has to be shown in my textbox wthich is some where in my page.i want to do in servevr side.
i am using c# asp.net
so tell me the coding.
Posted Jun 30, 2006, 8:31 AM
----Code--------
DropDownList DDLCtrl=(DropDownList)DataGrid1.Item[index].Cells[index].Controls[index];
//For e.g DropDownList DDLCtrl=(DropDownList)DataGrid1.Item[0].Cells[1].Controls[1];
Response.Write(DDLCtrl.SelectedItem.Text);
hope solved ur problem
ramakrishnaPosted Jun 30, 2006, 7:11 AM
it will return the selectedindex for u r selection
this is the syntax:
formname.comboboxname.selectedindex
take that value and use that index based on u r req.