UnGroupSeries (wbk, series, callback);
wbk. Sets workbook value.
series. Sets series
callback. Sets handler for operation execution end.
The UnGroupSeries method ungroups workbook series.
To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component). The workbook table must contain grouped series (see TSService.GroupSeries), and the following code must be added in the document opening event handler:
//Variable that will store selected series
var selSeries;
//Repository interaction end event handler. Used to set availability of the
//"Block Series" button depending on whether it is available to block the selected series and set whether
// there are blocked series in workbook
metabase.EndRequest.add(PP.Delegate(function(){
//Get workbook selected series
selSeries = wbk.getActiveSheet().getSelectedSeries();
//Set button availability
if (selSeries.length == 1 && PP.TS.isGroupSerie(selSeries[0]))
{
ungroupSeriesButt.setEnabled(True);
}
else
{
ungroupSeriesButt.setEnabled(False);
}
}));
var ungroupSeriesButt = new PP.Ui.Button({
ParentNode: document.body, //DOM parent node
Content: "Ungroup Series", //text
Click: PP.Delegate(onClickUngroupSeries)
});
function onClickUngroupSeries()
{
//Ungroup workbook series
tsService.UnGroupSeries(wbk, selSeries, PP.Delegate(onUngroupSeries, this));
//UnGroupSeries method execution end event handler
function onUngroupSeries(sender, args){
//Refresh to see ungrouped series
workbookBox.refreshAll();
}
}
After executing the example the button named Ungroup Series is placed on the HTML page. Select a grouped series and click this button. After this the grouped workbook series is ungrouped.
See also: