如何初始化DataGrid中的DropDownList
来源:互联网 发布:淘宝达人平台 编辑:程序博客网 时间:2024/04/27 20:09
private void dgDoubleDrp_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
//判断是否是编辑项
if (e.Item.ItemType == ListItemType.EditItem)
{
//找到编辑项中的drpOrder下拉列表控件
DropDownList drpOrderID = (DropDownList) e.Item.FindControl("drpOrder");
//设置在上个操作中drpOrder下拉列表中选中的项
drpOrderID.SelectedIndex = drpOrderID.Items.IndexOf(drpOrderID.Items.FindByText(orderID));
//找到编辑项中的drpProduct下拉列表控件
DropDownList drpProductID = (DropDownList) e.Item.FindControl("drpProduct");
//设置在上个操作中drpProduct下拉列表中选中的项
drpProductID.SelectedIndex = drpProductID.Items.IndexOf(drpProductID.Items.FindByText(productID));
}
}
- 如何初始化DataGrid中的DropDownList
- 处理在DataGrid中的DropDownList的事件
- 处理在DataGrid中的DropDownList的事件
- 如何在datagrid中用dropdownlist显示当前行的记录
- 如何实现在DataGrid中实现DropDownList控件的联动
- 无限级分类在DataGrid和DropDownList中的体现
- 在一个DataGrid中加入一个DropDownList后如何给DropDownList赋值
- DataGrid模版中嵌入了dropdownlist,如何触发这个dropdownlist的事件
- DataGrid动态绑定DropDownList
- Datagrid Bind DropDownlist.....
- DataGrid内绑定DropDownList
- DataGrid 与 DropDownList
- 搞定一个在DataGrid中DropDownList模板列值初始化的问题
- 如何使用DataGrid中的styleFunction
- 初始化Dropdownlist空间
- 使用DataGrid动态绑定DropDownList
- Using DropDownList control in DataGrid
- 使用DataGrid动态绑定DropDownList
- 关于手机游戏中的炮弹轨迹——抛物线
- javascript小技巧(转载)
- 关于敏捷软件开发
- G东方个股分析 9/3 ,
- 一个将调试信息输出到控制台的Log函数
- 如何初始化DataGrid中的DropDownList
- DirectShow学习笔记1
- 招股说明书--我们是一家**的公司
- 请教Interface与Object之间的关系问题
- 20060904--20060908学习计划
- 个人开发计划之总动员篇----如何让你的共享软件成为印钞机
- jfreechart设置好文章
- Jemmy的使用
- 为多线程处理同步数据