LyteNyte Grid logo for light mode. Links back to the documentation home page.
Client Row Source

Client Row Pinning

Configure the client row source to pin rows to the top or bottom of the grid viewport. Pinned rows will remain visible as the user scrolls.

Info

For a high-level overview of pinned rows, see the Row Pinning guide. This guide covers row pinning specifically when using the client row source.

Pinning Rows Top

To pin rows to the top of the grid, set the topData property on the client row data source. The demo below pins two rows to the top of the viewport. Notice that these rows remain visible as you scroll.

Top Pinned Rows

Fork code on stack blitzFork code on code sandbox

Pinning Rows Bottom

To pin rows to the bottom of the grid, set the botData property on the client row data source. The demo below pins two rows to the bottom of the viewport. These rows remain fixed to the bottom of the viewport even as you scroll.

Bottom Pinned Rows

Fork code on stack blitzFork code on code sandbox

Pinning Rows Top and Bottom

You can pin rows to both the top and bottom of the viewport by setting both topData and botData at the same time. Since pinned rows always remain visible, you must ensure the grid’s viewport has enough height to display them.

Top & Bottom Pinned Rows

Fork code on stack blitzFork code on code sandbox

Pinned Row Considerations

The client data source treats pinned rows as separate from the row data provided via the data property. In particular:

  • Pinned rows will never be filtered out.
  • Sorting rows will not sort pinned rows.
  • Pinned rows cannot be used for groups.

Next Steps