CheckedComboBoxEdit 全选之后,修改文本框所显示的内容


     private void checkedComboBoxEdit1_CustomDisplayText(object sender, DevExpress.XtraEditors.Controls.CustomDisplayTextEventArgs e)
        {
            string items = checkedComboBoxEdit1.Properties.GetCheckedItems().ToString(); List<string> checkItems = new List<string>(); if (items.Contains(",")) { string[] itemValue = items.Split(','); foreach (string i in itemValue) { checkItems.Add(i); } } if (checkItems != null) { if (checkItems.Count() == checkedComboBoxEdit1.Properties.Items.Count) { e.DisplayText = "ALL"; } } }

效果如下:

修改前:

修改后: 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM