ItemDataBound
来源:互联网 发布:公安部 2017年欺诈数据 编辑:程序博客网 时间:2024/06/05 06:00
protected void VerdictList_ItemDataBound(object sender, DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
RoleCollection List = new RoleCollection();
int RoleID = Convert.ToInt32(e.Item.Cells[0].Text);
RoleEntity Entity1 = List.GetRoleEntityByRoleID(RoleID);
e.Item.Cells[1].Text = Entity1.RoleName;
int RoleDptID = Convert.ToInt32(e.Item.Cells[2].Text);
DropDownList ApproverdptName = (DropDownList)(e.Item.Cells[4].FindControl("ApproverDpt"));
DptList dptlist = new DptList(RoleDptID);
ApproverdptName.DataValueField = "dptid";
ApproverdptName.DataTextField = "dptname";
ApproverdptName.DataSource = dptlist;
ApproverdptName.DataBind();
UserRoleCollection List1 = new UserRoleCollection((Convert.ToInt32(ApproverdptName.SelectedValue)), RoleID);
DropDownList ApproverList = (DropDownList)(e.Item.Cells[5].FindControl("ApproverList"));
ApproverList.DataValueField = "UserID";
ApproverList.DataTextField = "UserID";
ApproverList.DataSource = List1;
ApproverList.DataBind();
string defUser = GetDefUserID(AppID, Convert.ToInt32(e.Item.Cells[6].Text.Trim().ToString()));//默认选中用户。
ApproverList.SelectedIndex = ApproverList.Items.IndexOf(ApproverList.Items.FindByValue(defUser));
UserList List2 = new UserList(ApproverdptName.SelectedValue);
for (int i = 0; i < ApproverList.Items.Count; i++)
{
UserEntity Entity = List2.GetUserEntityByUserID(Convert.ToInt32(ApproverList.Items[i].Value));
ApproverList.Items[i].Text = Entity.UserName;
}
}
}
- ItemDataBound
- itemdatabound小结
- itemdatabound小结
- Repeater ItemDataBound
- 使用 ItemDataBound 、 ItemCreated 事件
- ItemCreated && ItemDataBound && ItemCommand
- DataGrid的ItemDataBound事件
- DataGrid的ItemDataBound事件
- DataGrid的ItemDataBound事件
- ItemDataBound的用法
- DataList.ItemDataBound 事件
- DataGrid.ItemDataBound原理
- repeat循环绑定ItemDataBound
- Repeater.ItemDataBound事件
- repeat循环绑定ItemDataBound .
- DataGrid的ItemDataBound用法实例
- ItemDataBound,ItemCreated的发生时间
- Repeater控件的ItemDataBound事件
- js出错,求解
- js出错,求解
- Chapter 2 Socio-technical Systems
- IIS7上ASP.net V1.1的配置详解图文教程
- Software Processes
- ItemDataBound
- gdb入门
- Project management
- Software Requirements
- Requirements Engineering Processes
- annotations 中文 文档 下载
- 泛型类的一个简单示例
- Google Summer of Code 2008
- 相关资料