Data grid - Scrolling
This section presents how to programmatically control the scroll.
You can scroll to a specific cell by calling
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:
Returns the current scroll position.
getScrollPosition: () => GridScrollParams
Triggers the viewport to scroll to the given positions (in pixels).
scroll: (params: Partial<GridScrollParams>) => void
Triggers the viewport to scroll to the cell at indexes given by
true if the grid had to scroll to reach the target.
scrollToIndexes: (params: Partial<GridCellIndexCoordinates>) => boolean