Skip to main content

getValue()

returns the current value of a Combo control

getValue(): string | string[];

Returns:

A string, or array with the id(s) of the items from data collection that are currently selected in the control.

Example

var value = form.getItem("combo").getValue();// -> "id_2"

The method returns a string value with the id of the currently selected item, if either multiselection:false is set or the multiselection config is not defined, otherwise - returns an array of string values with the ids of the currently selected items.