Source: PP.TS.WbkDocument;
The Source property determines data source set for attributes panel.
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:
//Get panel for editing selected series attribute values var serieAttributesPanel = workbookBox.getPropertyBarView().getSerieAttributesPanel(); var getSourceButt = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Data source", //Title Click: PP.Delegate(onClickGetSource) }); function onClickGetSource() { //Get wokbook, which data is displayed in component var WBK = serieAttributesPanel.getSource(); //Get current sheet number var sheetKey = WBK.getActiveSheetKey(); //Output current sheet number alert('Current sheet number ' + sheetKey); }
To get the data source defined for the attributes panel, click the Data Source button under the navigation panel.
See also: