refresh (args);
args. Event information
The refresh method refreshes a specified control in the time series ribbon.
To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), the repository must contain a workbook with the 5183 key, and the following code must be added in the handler that processes document opening event:
var NewKEY = 5183;
tsService.openDocument(NewKEY, onSecondOpened);
function onSecondOpened(sender, args)
{
//Get component for displaying menu of the Ribbon type
var ribbonView = workbookBox.getRibbonView();
//Get a new data source
var wbk2 = args.Workbook;
//Set the selected series in the new data source
tsService.setSelectedSeries(wbk2, [1], [0]);
var refreshButt = new PP.Ui.Button({
ParentNode: document.body, //DOM parent node
Content: "Refresh", //Text
Click: PP.Delegate(onClickRefresh)
});
function onClickRefresh(){
//Refresh the specified control on the tine series ribbon
ribbonView.refresh('Data');
}
}
After executing the example, the WorkbookBox component is placed on the HTML page, and the specified control is refreshed on the time series ribbon. After clicking the Refresh button in the Data tab of the time series ribbon menu, the Save Changes and Undo Changes buttons become inactive.
See also: