Workbook.NeedUpdateSelection

Syntax

NeedUpdateSelection: Boolean;

Description

The NeedUpdateSelection property determines whether it is necessary to update selection.

Comments

If this property is set to True selection needs to be updated, when it is False, there is no need to update.

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:

	var source = workbookBox.getSource().getActiveSheet();//return instance of the PP.TS.Workbook class
	//Get element for displaying workbook table
	var gridView = workbookBox.getDataView().getGridView();
	//Get whether refresh is required
	if (source.getNeedUpdateSelection())
	{
		gridView.setNeedUpdateSelection(True);
		source.setNeedUpdateSelection(False);
	}
	//Add series to workbook.
	tsService.addWbkSeries(source, source.getHier(), undefined, {"Index": 4, "PeriodLvl": "Month"});
	//Refresh element for displaying workbook table
	gridView.getInstance().reset();

A new series is added to the workbook after the example execution.

See also:

Workbook