Select value of DropDawnList Inside GridView
-
FormView1.FindControl("TextBox2") as TextBox;
I need like it to select the value for DrowpDownList inside GridView
(GridView1.Rows[Index].findControl("DropDownList1") as DropDownList).SelecteedValue
-
(GridView1.Rows[Index].findControl("DropDownList1") as DropDownList).SelecteedValue
-
I tried your code . but there is some error : Compiler Error Message: CS0122: 'System.Data.Index' is inaccessible due to its protection level
Try this code in selectedIndexChanged event of dropdownlist
DropDownList ddl = (sender as DropDownList);
string val = ddl.SelectedValue; -
I tried your code . but there is some error : Compiler Error Message: CS0122: 'System.Data.Index' is inaccessible due to its protection level
try this
foreach(GridViewRow gr in Gridview1.Rows)
{
string str = ((DropDownList)gr.FindControl("DropDowmList1")).SelectedValue;
} -
FormView1.FindControl("TextBox2") as TextBox;
I need like it to select the value for DrowpDownList inside GridView
please see the following url http://tareemnet.com/drop.JPG User Name : adnet Pass : 123 When Editting, the user can change the value using the dropdownlist, and then updating with that new value selected. I'm beginner, please provide me a full code in c# for that issue.