ComboBoxItemCollection.AddRange(Object[]) Method
Adds an array of items to the collection.
Namespace: DevExpress.XtraEditors.Controls
Assembly: DevExpress.XtraEditors.v26.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| items | Object[] | An array of objects representing items for the combo box editor. |
Remarks
The AddRange method adds an array of object to the current collection. Each object will represent an item in the dropdown list in a combo box editor.
Whenever you select a specific element from the dropdown list in a combo box editor, a corresponding object is assigned to the ComboBoxEdit.SelectedItem property and the edit box displays the textual representation of the object.
See the ComboBoxItemCollection.Add method to add a single object to the collection.
Note: to ensure proper functionality of the editor, items in the RepositoryItemComboBox.Items collection must be unique objects.
Example
The following code adds four string type elements to the item collection of a combo box editor:
string [] elems = new string[] {"Frankfurt", "Helsinki", "Kirkland", "London"};
comboBoxEdit1.Properties.Items.AddRange(elems);