Table of Contents
Text Property

Gets or sets the text of the currently selected item or the text entered by the user.

Syntax
 public String Text { get; set; }
Remarks

This property is only used when ShowCheckBoxes is false. When multi-selection is enabled (ShowCheckBoxes is true). You can not use this property to change the text of the selection box. In that case if you wish to get the text of the selected items, you can use the following code:

//Get the first selected item
object item = ComboBox1.SelectedItems[0];

//Get the ComboBoxItem object for this item
ComboBoxItem comboBoxItem = (ComboBoxItem)ComboBox1.ItemContainerGenerator.ContainerFromItem(item);

//Get the item text
string itemText = comboBoxItem.Text;
See Also