Articles in this section
Category / Section

How to select the item programmatically in winforms MultiSelectionComboBox?

1 min read

You can select the item programmatically in MultiSelectionComboBox control by using SelectedItem or SelectedItems property.

Refer the below code for your reference.

C#

// Using SelectedItem property to add item programmatically.
multiSelectionComboBox1.SelectedItem = multiSelectionComboBox1.Items[4];
 
// Using SelectedItems property to add item programmatically.
// multiSelectionComboBox1.SelectedItems.Add(multiSelectionComboBox1.Items[4]);

 

You can also select the item in MultiSelectionComboBox control by using SelectedIndex property.

Refer the below code for your reference.

C#

//Select the item in control
multiSelectionComboBox1.SelectedIndex = 4;

 

Select the item programmatically in MultiSelectionComboBox

C#: View sample in GitHub

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied