ImageComboBoxEdit.EditValue Property
Gets or sets the editor’s value.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Property Value
Type | Description |
---|---|
Object | The object representing the edit value. |
Remarks
The EditValue property matches the value of the selected item.
When you select a specific item from the dropdown, a corresponding ImageComboBoxItem object from the RepositoryItemImageComboBox.Items collection is assigned to the ImageComboBoxEdit.SelectedItem property and the value of the selected item is assigned to EditValue. See the ComboBoxItem.Value property to specify the item’s value.
When you set the EditValue via code, the control looks through the collection for an item with the same value. If found, the selected item can be retrieved via the ImageComboBoxEdit.SelectedItem property and its index specified by ComboBoxEdit.SelectedIndex. If such an item is not found, reading the ImageComboBoxEdit.SelectedItem property returns null and ComboBoxEdit.SelectedIndex specifies -1.
You can also set EditValue to an ImageComboBoxItem class object. In this instance, if the item belongs to the editor’s collection, EditValue is actually set to the item’s value. Otherwise, EditValue is set to the object being assigned.
Note: To ensure proper functionality of the ImageComboBoxEdit control, item values must be unique within the item collection.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the EditValue property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.