Required library edition:
Required library file: dhtmlxdataview.js
Returns currently selected ID. If mutliselection is enabled and mutliple items are selected, this method will return array of IDs
var id = view.getSelected();
as_array parameter has sense in multiselection mode, where method may return a single value or an array based on selection state. By using as_array parameter you will always receive an array as the result of the method , which can simplify further processing.