[DevExpress]控件-checkboxlist之运用
来源:互联网 发布:sqlserver列转行函数 编辑:程序博客网 时间:2024/06/05 09:10
数据绑定:
string strSql = "SELECT [UserName],[Mail] FROM [OA].[dbo].[DZ_Users]"; DataTable dt = new DataTable(); dt = DbHelperSQL.Query(strSql.ToString()).Tables[0]; chklboxL.DataSource = dt; chklboxL.DisplayMember = "UserName"; chklboxL.ValueMember = "Mail"; this.checkedComboBoxEdit1.Properties.DataSource = dt; this.checkedComboBoxEdit1.Properties.DisplayMember = "UserName"; this.checkedComboBoxEdit1.Properties.ValueMember = "Mail"; checkedComboBoxEdit1.EditValue = "test1@zettlercn.com,test2@zettlercn.com"; //默认值
获取:
string mail = string.Empty; DataRowView value = chklboxL.SelectedValue as DataRowView; BaseCheckedListBoxControl.CheckedItemCollection checkboxs = chklboxL.CheckedItems; foreach (DataRowView item in checkboxs) { string name = item["UserName"].ToString(); mail += item["Mail"].ToString() + ","; } XtraMessageBox.Show(mail.Substring(0, mail.Length - 1), "警告");
效果:
0 0
- [DevExpress]控件-checkboxlist之运用
- [DevExpress]控件之GridLookupedit的运用
- [DevExpress]Lookupedit之运用
- CheckBoxList控件之数据绑定
- DevExpress控件之gridControl
- DevExpress控件之皮肤
- DevExpress控件之XtraTreeList
- DevExpress控件之"treeList"
- DevExpress之TreeList控件
- DevExpress之TreeList控件
- DevExpress控件之皮肤
- DevExpress控件之GridControl控件
- DevExpress控件之GridControl控件
- DevExpress控件之GridControl控件
- DevExpress控件之GridControl控件
- DevExpress控件之GridControl控件
- [DevExpress]TreeListLookUpEdit带checkbox之经典运用
- Devexpress使用之:TreeList控件
- swf2pdf转swf时字符集问题
- Python陷阱:tuple与Nonetype
- Linux中修改环境变量及生效方法
- CSAPP 学习笔记 Chapter two
- C++成员函数的一些理解
- [DevExpress]控件-checkboxlist之运用
- C++ *p &a p->function() 之间的意义
- 【笔记】Double类型的加减乘除(项目中在计算价格中用到)
- Android获取手机/SD卡内存空间使用情况
- Win10 配置 Anaconda+theano
- ssh 免密码登陆失败的权限问题
- 封装 、 继承 、多态
- compress()方法
- 【Java基础】--构造函数