TSService.setTableFixHeaders

Syntax

setTableFixHeaders (report, metadata, callback);

Parameters

report. Sets object

metadata. Sets metadata that contains fixed area settings

callback. Sets operation completion handler.

Description

The setTableFixHeaders method is used to set fixed areas in a table.

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 setTableFixHeadersButt = new PP.Ui.Button({
	ParentNode: document.body, //DOM parent node
	Content: "Set Fixed Areas", //Text
	Click: PP.Delegate(onClickTableFixHeaders)
});
var x  = False;
function onClickTableFixHeaders()
	{
		var source = workbookBox.getSource().getActiveSheet();//returns an instance of the PP.TS.Workbook class
		//Create an object that determines whether table fixed areas are set
		var metadata = {fixHeaders: x}
		//Set table fixed areas
		tsService.setTableFixHeaders(source, metadata, PP.Delegate(onResponse));
		function onResponse(sender, args)
			{
				//On the next button click setting of fixed areas is changed
				x = !x;
				//Refresh component for displaying workbook
				workbookBox.refreshAll();
			}
	}

After executing the example a button named Set Fixed Areas is placed in the HTML page. Clicking the button hides or shows fixed table areas:

or

See also:

TSService