TabSheetSettings.SelectionColor

Syntax

SelectionColor: String;

Description

The SelectionColor property determines a fill color of selected table cells.

Comments

Use JSON and the setSelectionColor method to set the property value and the getSelectionColor method to get the property value.

The string with fill color value for selected table cells is set in the hexadecimal format (HEX), for example, #15F08B.

To determine a border color for selected table cells, use the TabSheetSettings.SelectionBorderColor property.

To determine fill color transparency degree for selected table cells, use the TabSheet.setSelectionTransparent and TabSheet.getSelectionTransparent methods.

Formatting parameters of selected table cells are set by default in repository settings on the Report Formatting tab.

NOTE. The fill color that is set using the SelectionColor property or the setSelectionColor method is applied only if default formatting parameters for selected table cells are used. To reset custom settings and restore default formatting parameters for selected table cells, click the Reset Settings button.

Example

Executing the example requires that the HTML page contains the GridBox component named grid (see Example of Placing the GridBox Component). The repository should also contain a regular report with the 11775 key.

Add a function named viewGrid to description of the GridView.Rendered event:

// Implement event after the first table rendering
grid.Rendered.add(function (sender, args) {
    // Get table
    tabSheet = grid.getTabSheet();
    // Set fill color for selected table cells
    tabSheet.setSelectionColor("#c146e9");
    // Set border color for selected table cells
    tabSheet.setSelectionBorderColor("#15f08b");
    // Display the current value of fill color transparency degree for selected table cells
    transparent = tabSheet.getSelectionTransparent();
    console.log("Color transparency degree: " + transparent);
    // Change fill color transparency degree for selected table cells
    tabSheet.setSelectionTransparent(0.7);
}, this);

After executing the example, the formatting of selected table cells will be changed: fill color, border color, fill color transparency degree. The console displays the value of fill color transparency degree for selected table cells before its change.

See also:

TabSheetSettings