在CheckedComboBoxEdit中获取选中的活动值
本文关键字:活动 获取 CheckedComboBoxEdit | 更新日期: 2023-09-27 18:01:27
我想知道如何在CheckedComboBoxEdit中检查活动,以便在数据库中保存活动值。我有一个有N个数据量的列表,我想只保存活动数据。
谢谢! !
方法获取选中项的集合CheckedComboBoxEdit.Properties.GetItems.GetCheckedValues ()方法。方法中选中项的值底层列表控件。
要完成此任务,还可以使用以下方法:
string items = string.Empty;
foreach (CheckedListBoxItem item in checkedComboBoxEdit1.Properties.GetItems())
if (item.CheckState == CheckState.Checked)
items += string.Format("{0} YES 'r'n", item.Description);
else
items += string.Format("{0} NO 'r'n", item.Description);
items = items.TrimEnd("'r'n".ToCharArray());
XtraMessageBox.Show(items);
引用:
Get Checked Items In A DevExpress CheckedComboBoxEdit
如何遍历CheckedComboBoxEdit
如何检索CheckedComboBoxEdit控件
你可以试试这个吗
CheckedComboBoxEdit.Properties.GetItems.GetCheckedValues()
请让我知道它是否适合你。
关于CheckedComboBoxEdit成员的更多信息:https://documentation.devexpress.com/WindowsForms/DevExpressXtraEditorsCheckedComboBoxEditMembersTopicAll