DataGrid.setColumnVisibility

Syntax

setColumnVisibility(colIndex: String, isVisible: Boolean, noReRender: Boolean);

Parameters

colIndex. Name of the column, for which it is required to determine visibility.

isVisible. Indicates column visibility. Available Values:

noReRender. Indicates whether table must be rerendered. Available Values:

Description

The setColumnVisibility method determines whether the specified column is shown.

Example

To execute the example, the HTML page must contain the DataGrid named grid (see Example of Creating the DataGrid Component). Hide one of the table columns:

// Specify column name
var name = "popul";
// Check if the specified column is visible
if (grid.getColumnVisibility(name)) {
    // Hide column
    grid.setColumnVisibility(name, False, False);
}

After executing the example one of the table columns is hidden:

See also:

DataGrid