On gridview row update I want to save the value choosed in the dropdownlist . how can I do that? Also,how can I make the value choosed in the dropdown visible in the gridview.
thans
Try something like this
protected void GridViewRowUpdating(object sender, GridViewUpdateEventArgs e)
{
var rowIndex = e.RowIndex;
var row = GridView.Rows[rowIndex];
var ddl = row.FindControl("YOURDROPDOWN") as DropDownList;
if(ddl != null)
var value = ddl.SelectedValue;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.