Let's say I have a multiSelectionComboBox
from Synfusion with items in Windows Forms like this :
multiSelectionComboBoxDays.Items.Add("Monday");
multiSelectionComboBoxDays.Items.Add("Tuesday");
multiSelectionComboBoxDays.Items.Add("Wednesday");
...
I want "Tuesday" and "Wednesday" items to be selected by default. I tried :
multiSelectionComboBoxDays.SelectedItems = "Tuesday";
multiSelectionComboBoxDays.SelectedItem = "Tuesday";
and other variants with no success.
I know I can use SelectAll()
and UnSelectAll()
, but this is not what I want.
How can I programmatically select an item (or many) in MultiSelectionComboBox?
Have you tried:
multiSelectionComboBoxDays.SelectedItems.Add()
multiSelectionComboBoxDays.AddVisualItem()
It's been a while since I used Syncfusion, so I might be a tad rusty