add(item, index)
Class: ComboBox.
Description:
Adds a list item at the end of the list, or inserts the item at specified index.
Parameters:
| Name | Type | Description |
|---|---|---|
|
|
string | number | ListItem |
List item as a string, number or a ListItem formatted object. |
|
|
number |
Integer position at which to add the item. |
Returns:
Returns this component instance.
Type: ComboBox
Examples:
combo1.add({text: "New Item", ...more optional properties}); // Adding item as object
combo1.add("New Item"); // Adding item as string
combo1.add(45); // Adding item as number
