ValidationCatView.getLegendButton

Syntax

getLegendButton();

Description

The getLegendButton method returns the Legend button in the Validation tab of workbook ribbon.

Comments

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

On clicking this button workbook table shows a legend with the list of executed validation rules.

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. At least one validation rule mutt be executed.

Show the legend that contains the list of executed validation rules in workbook:

// Get workbook tool ribbon
var ribbon = workbookBox.getRibbonView();
// Get the Validation tab
var validationCategory = ribbon.getValidationCategory();
// Open this tab
validationCategory.setIsHiddenActive(True);
ribbon.refreshAll();
// Enable displaying of validation elements
validationCategory.getSource().setShowValidation(True);
// Get the Legend button
var legendButton = validationCategory.getLegendButton();
// Display the button as pressed
legendButton.setIsPressed(True);
// Imitate the Legend button click
legendButton.Click.fire(legendButton);
// Display the button as released
legendButton.setIsPressed(False);
// Refresh the Validation tab
validationCategory.refresh();

After executing the example the workbook shows legend that contains executed validation rules:

See also:

ValidationCatView