[英]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.