Columns in LyteNyte Grid may be hidden based on the hide
property of the
column. In addition a column may be visually omitted when it is part of a
group and the group is collapsed (or expanded in the case of columns that should
only be displayed when the group is closed). This guide will cover the
visibility settings of a column and the nuances involved in showing and hiding columns
in LyteNyte Grid.
Set a column's hide
property to true
to make it hidden. Typically, users toggle column
visibility through LyteNyte Grid components like the Column Manager
or Pill Manager.
The hidable
flag on the column is a hint to UI components that the column should not be hidable
by the user. It does not prevent the column from being hidden programmatically.
When a column belongs to a column group, it may be visually omitted from the viewport based on the group's state. For example, you can configure a column to appear only when its group is expanded.
LyteNyte Grid and its components don't consider these temporarily hidden columns as truly "hidden." The grid treats this as a temporary view state applied by user interaction rather than a permanent visibility setting. While this distinction may not affect most use cases, it's important to understand when writing code that manages column visibility.
The example below demonstrates this difference:
Use the columnIsVisible
API method to check if a column is currently visible:
readonly columnIsVisible: (column: Column, ignoreGroupVisibility?: boolean) => void;
The Column
parameter is either an Enterprise
or Core
column depending on which LyteNyte Grid
edition you're using. Set the ignoreGroupVisibility
flag to true
when you want to check
visibility independent of column group state.
To programmatically change column visibility, use the columnUpdate
or columnUpdateMany
API
methods to modify the hide
property. For more details on these methods, refer to the
API Reference.