getSelectedId

returns the id of the selected item

string|array getSelectedId( [boolean as_array] );
as_arraybooleanspecifies whether the result should always be returned as an array.
The default value is false
string|arraythe id of the item

Example

var id = list.getSelectedId(); // id = someid
 
var id = list.getSelectedId(true); // id = [someid]

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.