首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

DataGrid中怎么读取模板列中DropDownList选中的值

2012-02-06 
DataGrid中如何读取模板列中DropDownList选中的值DataGrid中加入DropDownList模板列DropDownList中已经绑

DataGrid中如何读取模板列中DropDownList选中的值
DataGrid中加入DropDownList模板列
DropDownList中已经绑定数据
现求如何读取DataGrid选定行中DropDownList的值

[解决办法]
把相应的列专为模板列侯
后:
DropDownList ddl=(DropDownList )(e.Item.cell[i].FindControl( "DropDownList1 "))

这样。。你就可以把ddl当成你要的控件,进行常规的操作就好了

比如string s=ddl.SelectedValue.ToString();

热点排行