ComboBox
The ComboBox control is one of the most powerful and flexible in C1 MVC's input module. It can be used to edit strings and to select items from lists. It is used as a base class for several other controls including AutoComplete, MultiSelect, InputTime, and Menu.
The main properties in the ComboBox control are:
- itemsSource Gets or sets an array (or CollectionView) containing the items (values or objects) to choose from.
- displayMemberPath Gets or sets the name of the property of the items to display in the input element and in the drop-down list.
- selectedValuePath Gets or sets the name of the property of the items to use when getting or setting the value of the selectedValue property.
- selectedItem Gets or sets the currently selected item in the itemsSource collection.
- selectedIndex Gets or sets the index of the currently selected item.
- selectedValue Gets or sets the value of the selectedValuePath property in the currently selected item.
- isEditable Gets or sets a value that determines whether users should be allowed to enter values not present in the itemsSource.
- isRequired Gets or sets a value that determines whether users should be allowed clear the text in the control.
This example illustrates the use of these properties:
Data
ComboBox
name
value
{"name":"Zero","value":0}
0
0
Zero