TSService.setAutoUpdate

Syntax

setAutoUpdate (wbk, series, callback);

Parameters

wbk. Sets workbook value.

series. Sets series.

callback. Sets operation completion handler.

Description

The setAutoUpdate method sets autoupdate.

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 setAutoUpdateButt = new PP.Ui.Button({
		ParentNode: document.body, //DOM parent node
		Content: "Autoupdate", //text      
		Click: PP.Delegate(onClickAutoUpdate)     
	}); 
				
	function onClickAutoUpdate()
	{
		//Set workbook value
		var wbk = args.Workbook; 
		var series = {};
		series.autoRecalc = True;
		series.its = {it : []};
		tsService.setAutoUpdate(wbk, series, PP.Delegate(onResponse));
		function onResponse()
		{						
			workbookBox.refreshAll();
			alert("Autoupdate is set");
		}			
	}

After executing the example the WorkbookBox component and the Autoupdate button are placed in the HTML page. Clicking this button sets autoupdate for the workbook and shows an appropriate message to the screen.

See also:

TSService