Skip to content

Data Grid - Scrolling

This section presents how to programmatically control the scroll.

Scrolling to specific cells

You can scroll to a specific cell by calling apiRef.current.scrollToIndexes(). The only argument that must be passed is an object containing the row index and the column index of the cell to scroll. If the row or column index is not present, the grid will not do any movement in the missing axis.

The following demo explores the usage of this API:


getScrollPosition: () => GridScrollParams
scroll: (params: Partial<GridScrollParams>) => void
scrollToIndexes: (params: Partial<GridCellIndexCoordinates>) => boolean