DropDownList dp = (DropDownList)e.Item.FindControl("DropDownList1");
解决方案 »
- ajax分页(下班结帖)
- 为什么下面的代码中黄色的部分执行不了?帮帮忙哦
- GridView控件问题,解决这个问题包括我开的两个100分的贴(200分)还有我剩下的200多分,一共400多分全部给你,说话算数.
- asp.net访问数据库时出现问题?????请帮忙
- 如何让带链接的图片位置不受应用是否在虚拟路径影响,或include文件或用模版页时的影响
- CNBlogsDottext博客源码讨论一下,blog的traceback是怎么实现的,还有空间分配时怎么实现的
- 医药软件与.net
- 高分求救!aspnet_wp.exe的问题
- 各位大侠,怎么用href打开超链接的同时,在新的窗口里显示,只用vbsrcipt
- 在分页情况下,如何知道DataGrid的页数?
- 关于关系表的数据添加...
- 那位用ASP.net的SSL编过程,能不能介绍一下,发点资料,谢谢!!
DataGrid1.DataBind();
DropDownList dp = (DropDownList)DataGrid1.Items[DataGrid1.EditItemIndex].FindControl("DropDownList1");
private void dgTeam_EditCommand(object source, DataGridCommandEventArgs e)
{
dgTeam.EditItemIndex = e.Item.ItemIndex;
DropDownList selCountry = (DropDownList) dgTeam.Items[dgTeam.EditItemIndex].FindControl("selCountry");
selCountry.Items.FindByValue(e.Item.Cells[0].Text).Selected = true;
BindData(); }
//先对dgTeam绑定数据,然后再查找DropDownList
YourDataBind()
DropDownList selCountry = (DropDownList) dgTeam.Items[dgTeam.EditItemIndex].FindControl("selCountry");