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
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 lock and unlock 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
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.

Example
View Source
Change Theme: