setValue()
selects option(s) in ComboBox
setValue(value: Id | Id[]): void;
Parameters:
value: string | number | (string | number)[]
- the ID(s) of items from data collection that should be selected in Combo Box
info
Note, that you need to pass the ID(s) of Combo options as a value of the value parameter.
Example
// selects one option
combo.setValue(combo.data.getId(1));
// selects several options at once
combo.setValue([combo.data.getId(1), combo.data.getId(3)]);
Related sample: Combobox. Set value