LanerBoxView.getIndexOfSelectedPoints

Syntax

getIndexOfSelectedPoints ();

Description

The getIndexOfSelectedPoints method returns an array of indices of the points selected in the table.

Example

To execute the example, the page must contain the LanerBox component named lanerbox (see LanerBox Constructor), and the following code must be added in the handler that processes document opening event:

// Create a button
	var btnGetIndexsOfSelected = new PP.Ui.Button({
	ParentNode: "params", //DOM parent node
	Content: "GetIndexsOfSelected", //text
	Click: PP.Delegate(function(sender, args){ //click handler
	console.log("Get array of indexes of points selected in table");
	var iSelPoints = lanerbox.getIndexOfSelectedPoints();
	console.log(iSelPoints);
	console.log("Get array of indexes of series selected in table");
	var iSelSeries = lanerbox.getIndexOfSelectedSeries();
	console.log(iSelSeries);
	}, this)
	

After executing the example the GetIndexsOfSelected button is added to the HTML page, on clicking this button the browser console displays indexes array:

Get array of indexes for selected points

[1]

Get array of indexes for selected table series

[4]

See also:

LanerBoxView