Workbook.removeSelectedSeries

Syntax

removeSelectedSeries (value);

Parameters

value. Sets a series or series array.

Description

The removeSelectedSeries method removes a table row from the array of selected rows.

Example

To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), and also add the following code in the handler, that processes document opening event:

	metabase.EndRequest.add(function (){
	setTimeout(function() {
	var source = workbookBox.getSource().getActiveSheet();//return instance of the PP.TS.Workbook class
	//Get selected series
	var selSeries = source.getSelectedSeries();
	alert("Id of selected series: " + source.getSelectedSeries()[0].id);
	//Remove series from array of selected ones
	source.removeSelectedSeries(selSeries);
	if(source.getSelectedSeries().length)
	alert("Id of selected series: " + source.getSelectedSeries()[0].id);
	else
	alert("This workbook does not contain selected series")
	},1000);
	});

A message that contains ID of selected series is shown after the example execution. If the workbook does not contain selected series, the message "This workbook does not contain selected series" is shown.

See also:

Workbook