TSService.setTableStyle

Syntax

setTableStyle (report, metadata, callback);

Parameters

wbk. Sets workbook value.

metadata. Sets metadata that contains style settings.

callback. Sets handler for operation execution end.

Description

The setTableStyle method is used to set table style.

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 setTableStyleButt = new PP.Ui.Button({
		ParentNode: document.body, //DOM parent node
		Content: "Set Table Style", //text      
		Click: PP.Delegate(onClickSetTableStyle)     
	}); 
				
	function onClickSetTableStyle()
	{
		var report = args.Workbook;
		metadata = {
		Name: "EAX table style",
		PredefinedStyle: "ExtRedStriped"
		};
		//Set style
		tsService.setTableStyle(report, metadata, PP.Delegate(onTableStyle, this)); 
	}
			   
		//setTableStyl method execution end handler
		function onTableStyle(sender, args){
		//Refresh to see the set style
		workbookBox.refreshAll();
	}

After executing the example a button named Set Table Style is placed in the HTML page. On clicking this button a new style is applied to the table:

See also:

TSService