setColumnVisibility(colIndex: String, isVisible: Boolean, noReRender: Boolean);
colIndex. Name of the column, for which it is required to determine visibility.
isVisible. Indicates column visibility. Available Values:
true. Column is visible.
false. Column is hidden.
noReRender. Indicates whether table must be rerendered. Available Values:
true. It is not required to rerender table.
false. It is required to rerender table (default).
The setColumnVisibility method determines whether the specified column is shown.
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: