SeriesAbstractCatView.getInsertButton

Syntax

getInsertButton();

Description

The getInsertButton method returns the Add Series button of the workbook ribbon.

Comments

This method returns an object of the PP.Ui.RibbonButton type.

Example

To execute the example, the HTML page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), and a table must be loaded to workbook data area. Add a new time series:

// Get workbook tool ribbon
var ribbon = workbookBox.getRibbonView();
// Get the Data tool ribbon tab
var dataCategory = ribbon.getDataCategory();
// Display and open it
dataCategory.setIsHiddenActive(True)
ribbon.refreshAll();
// Get the Add Series button
var insertButton = dataCategory.getInsertButton();
// Imitate this button click
insertButton.Click.fire(insertButton);

After executing the example the Add Series dialog box is shown. Choose the Annual calendar level and click OK. A new series is added in the table:

Manually select the added series. Next programmatically delete this level:

// Get the Remove button
var removeButton = dataCategory.getRemoveButton();
// Simulate button click
removeButton.Click.fire(removeButton);

After executing the example a dialog box appears where the user is requested to confirm deletion of selected series. Click the Yes button. After this the time series is removed from the table:

See also:

SeriesAbstractCatView