Frozen Columns
The Grid lets you freeze (lock) one or more columns. This will allow the user to scroll horizontally through the Grid, but still be able to keep some important columns visible at all times (such as ID or command column).
To freeze a column:
- Set its
Lockedparameter totrue. - Set its
Widthparameter in pixels.
Frozen columns make sense when the Grid has a horizontal scrollbar. Horizontal scrolling requires all columns to have their Width set and the sum of all column widths exceeds the Grid Width. Read more at the Grid Column Width Behavior article.
In some scenarios, the Grid Width must be set in absolute units like px or vw, otherwise the Grid may expand horizontally and not render a horizontal scrollbar.
Column freezing includes the following cases:
Frozen first and last columns
Use static markup to Freeze the first and last columns in a Grid
Frozen column in the middle of the Grid
Observe the behavior of a locked column that is neither first, nor last