Locked Columns

Locked (frozen or sticky) columns are the columns that are visible at all times while the user scrolls the Grid horizontally.

By default, the columns of the Grid are not locked. The locked columns require all columns to have a fixed width.

Example
View Source
Edit In Stackblitz  
Change Theme:

Locked Columns With Column Menu

The columnMenu can be used to render buttons that will lock and unlock a specific column on click.

In the following example we:

  1. Render a custom component inside the column menu that will locked and unlocked the column.
  2. Update the columns collection when a column is locked/unlocked.
  3. Sort them by the locked field to show all locked columns on the left.
Example
View Source
Edit In Stackblitz  
Change Theme:

Locked Column With Custom Cell

When using the locked columns with a custom cell the specific styles and classes have to be added to the td elements. The classes and the styles will be part of the cell props.

In this article

Not finding the help you need?