怎么在后台获得GridView里下拉列表控件名 怎么在后台获得GridView里下拉列表控件名 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 for (int i = 0; i < GridView1.Rows.Count;i++ ) { ((DropDownList)GridView1.Rows[i].FindControl("ddlname")).SelectedItem.Text; } 是拿值么?int ddlGradeId = Convert.ToInt32((GridView1.Rows[GridView1.EditIndex].FindControl("ddlGradeId") as DropDownList).Text);这样可以获得下拉列表控件的文本 看你在哪个事件里了编辑的时候获取 protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { string value = (this.GridView1.Rows[e.RowIndex].FindControl("DropDownList1") as DropDownList).SelectedValue; }(this.GridView1.Rows[e.RowIndex].FindControl("DropDownList的ID") as DropDownList).SelectedValue; 有一个不是太明白的问题求教! 服务端向客户端发送数据 Winform 访问 AEECSS 问题 用过UltraWebGrid近来看看 关于datalist排序方向的问题 |M| 100分求 在Altas页面中当用户登录失败的时候弹出提示框:"登录失败" DataList传值调转的问题 ASP.NET中,怎样实现一个帐号只能登陆一次的功能? 如何将CSS应用到DataGrid的ButtonColumn 困惑菜鸟的问题,请大家帮忙!(购物车问题) .net update 的问题 接口的写法
{
((DropDownList)GridView1.Rows[i].FindControl("ddlname")).SelectedItem.Text;
}
int ddlGradeId = Convert.ToInt32((GridView1.Rows[GridView1.EditIndex].FindControl("ddlGradeId") as DropDownList).Text);
这样可以获得下拉列表控件的文本
{
string value = (this.GridView1.Rows[e.RowIndex].FindControl("DropDownList1") as DropDownList).SelectedValue;
}(this.GridView1.Rows[e.RowIndex].FindControl("DropDownList的ID") as DropDownList).SelectedValue;