Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
17259
Set text for multi select ComboBoxTool
posted

I added a ComboBoxTool in my toolbar with checkboxes. Usually the combobox text is the display string of the selected item.

When you use checkboxes, there could be a situation where the selected item is not checked at all, so I tried to set the text manually with:

comboBox.Text = string.Join(",", comboBox.ValueList.CheckedItems.Select(i => i.DisplayText).ToArray());

However, this code doesn't work. Although there is a set to the Text property, it stays the same and always shows the text of the selected item.

Is there a way to do that?

Thanks