setSource (value);
value. Data source, an instance of the PP.TS.StatTabSheet class.
The setSource method sets a data source for a tab sheet.
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:
//Expand panel with tabs for displaying statistics
workbookBox.getDataView()._TabStatPanel.expand();
var setSourceButt = new PP.Ui.Button({
ParentNode: document.body, //DOM parent node
Content: "Remove source", //Text
Click: PP.Delegate(onClickSetSource)
});
function onClickSetSource()
{
//Get the Equations tabsheet in the workbook statistics panel
var statTabSheet = workbookBox.getDataView()._TabStatPanel._CoeffPanel;
//Set a new data source for the Equations tabsheet in the workbook statistics panel
if (statTabSheet._Source)
{
statTabSheet.setSource(null);
setSourceButt.setContent("Set source");
}
else
{
statTabSheet.setSource(wbk.getStatCoeffTabSheetSource());
setSourceButt.setContent("Remove source");
}
//Refresh the Equations tabsheet in the workbook statistics panel
statTabSheet.refresh();
}
After executing the example the WorkbookBox component is placed on the HTML page. A new data source is set on clicking the Remove Source button in the Equation tab of workbook statistics panel.
See also: