getSelectedItem

gets an object of the selected data item

object getSelectedItem( [boolean as_array] );
as_arraybooleanif true, returns an array with selected item(s)
objectthe object of the selected item with all its properties

Example

var item = grid.getSelectedItem();
//item = {id:1, title:"Title", year:1987}

Details

If several items are selected, the method will return an array of selected items anyway. If the array mode ("as_array") is switched on, the method will return an array with one item.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix ui component library and page of javascript tree table product.