Devexpress xtragrid Checklistbox显示第一个单词项目已选中

时间:2016-09-23 09:37:27

标签: c# devexpress xtragrid

我使用xtragrid,我有一个colum是checklistbox:

new DevExpress.XtraEditors.Controls.CheckedListBoxItem ("D", "Doctor"), 
new DevExpress.XtraEditors.Controls.CheckedListBoxItem ("P", "Patient"), 
new DevExpress.XtraEditors.Controls.CheckedListBoxItem ("O", "Other Companies"), 
new DevExpress.XtraEditors.Controls.CheckedListBoxItem ("R", "Related Companies")});

当我选择一个复选框时,我希望它显示以下内容:(D,P,O,R)不是医生,病人....

enter image description here

1 个答案:

答案 0 :(得分:1)

处理CheckedComboBoxEdit控件的CustomDisplayText event

private void checkedComboBoxEdit1_CustomDisplayText(object sender, DevExpress.XtraEditors.Controls.CustomDisplayTextEventArgs e)
{
    e.DisplayText = e.Value.ToString();
}