Skip to content

Data Grid - Row pinning

Pin rows to keep them visible at all times.

Pinned (or frozen, locked, or floating) rows are those visible at all times while the user scrolls the data grid vertically.

You can pin rows at the top or bottom of the Data Grid by passing pinned rows data through the pinnedRows prop:

const pinnedRows: GridPinnedRowsProp = {
  top: [{ id: 0, brand: 'Nike' }],
  bottom: [
    { id: 1, brand: 'Adidas' },
    { id: 2, brand: 'Puma' },
  ],
};

<DataGridPro pinnedRows={pinnedRows} />;

The data format for pinned rows is the same as for the rows prop (see Feeding data).

Pinned rows data should also meet Row identifier requirements.

Name
City
Username
Email
Age
Christopher Norman
Icibatar
@cokdi
vav@jamfit.fr
18
Gabriel Bishop
Hudkokpu
@puge
nizwe@wukus.gq
26
Gussie Hunter
Wevkuzi
@nepas
tocevni@gojfoso.re
66
Myrtle Wise
Fiturumid
@jug
utzuwap@mop.iq
62
Landon Graves
Arvadak
@doz
bot@tumpoip.ls
51
Warren Castro
Edoffam
@saori
hetuttav@zajlon.bj
69
Sue Russell
Zuvufis
@mu
refregep@uswo.ve
59
Edith Leonard
Malivuva
@isagawi
vut@gohzi.ss
76
Alvin Black
Gunaddet
@higiw
ve@bokrig.sx
40
Gavin Lynch
Majvonkuw
@jibrejic
ohiros@sulu.ls
25
Total Rows: 10
Press Enter to start editing

Controlling pinned rows

You can control which rows are pinned by changing pinnedRows.

In the demo below we use actions column type to add buttons to pin a row either at the top or bottom and change pinnedRows prop dynamically.

Name
City
Username
Email
Gussie Saunders
Gibizu
@latufsi
takzac@seheri.by
Roy Dawson
Movterpod
@mopekew
hozzihpuw@jusueh.li
Cynthia Guerrero
Puzboldi
@jovodes
cojsem@nuda.cf
Isabel Page
Dolegnob
@ebwajuce
hikreh@distebij.bt
Adelaide Dean
Vorusud
@upofec
ficoh@tagtoji.gp
Mae Bell
Jaawewek
@si
cih@tawaf.om
Clyde Fernandez
Sezilej
@borlarce
hefim@libwip.rs
Adrian Bryant
Arruzku
@teg
gad@usbib.pm
Randy Robinson
Logijvu
@donufivoc
makdodva@can.gb
Olga Moran
Puknorir
@sejenocer
rarjozi@wof.ng
Logan Garrett
Sotode
@zipzatu
juigo@sebun.ai
Total Rows: 20

Usage with other features

Pinned rows are not affected by sorting and filtering.

Pagination does not impact pinned rows as well - they stay pinned regardless the page number or page size.

Desk
Commodity
Trader Name
Trader Email
Quantity
Filled Quantity
Is Filled
Status
No rows

Rows per page:

0–0 of 0

API