[英]GridView1: How to save the selected value from the dropdownlist and make it visible
在gridview行更新中,我要保存在下拉列表中选择的值。 我怎样才能做到这一点? 另外,如何使在下拉列表中选择的值在gridview中可见。
s
试试这个
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;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.