getSelectedId
returns the id(s) of the selected item(s)
string|array getSelectedId( [boolean as_array] );
boolean | specifies whether the result should always be returned as an array. The default value is false |
| string|array | the single item id or an array of ids |
Example
//single select mode
var id = list.getSelectedId(); // id = someid
//multiselect mode
var id = list.getSelectedId(); // id = [someid1, someid2, someid3]
Related samples
See also
Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support,
connect with other developers, and share your feedback there.