Programmatically Checking DevExpress CheckedComboBoxEdit Items

c#, devexpress, winforms

Solution

Items state of the CheckedComboBoxEdit tied to its EditValue. You can check items by setting an appropriate editor value: a list of values (each item has the value and display text) delimited with a separator sign. The separator sign is specified via the RepositoryItemCheckedComboBox.SeparatorChar property.

Problem

I have a CheckedComboBoxEdit that's bound to a TableAdapter that populates it with a list of items. I have a separate query that returns a dataset that lists the items that need to be checked. I need to iterate through the CheckedComboBoxEdit items to check them as needed. How can I make the CheckedComboBoxEdit reflect the data from the query which returns a list of items that need to be checked? I'm using C# in Visual Studio 2010 with DevExpress 10.2.9. Any help on this would be greatly appreciated, and any other solutions to this issue would be great too.

Original source