tags:

views:

262

answers:

2

Is it possible to set the selected item of a combobox to be an object that is not in its dropdown list?

If yes, then what must one do?

+1  A: 

Use the Text property:

comboBox.Text = "I'm not in the list!";

If you want to add the item to the list, use the Items collection:

comboBox.Items.Add("I was added to the list!");
SLaks
A: 

Is there a reason you cannot add it to the list after the object was generated? Is the object generated asynchronously?

myComboBox.Items.Add(newItem);
Asher