Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an event for detecting when grid is ready after rowData update?

Tags:

ag-grid

I have a grid where rowData changes if the user refreshes the data. I need to scroll back to the same place (topScroll) where the user last scrolled before refreshing. In order to scroll to that point I need to detect the event where grid is ready every time after rowData changes. I see that onGridReady fires only once. Is there another event that I can use?

like image 645
mila Avatar asked Dec 30 '25 09:12

mila


1 Answers

You should be able to use onRowDataChanged() event.

From the docs -

rowDataChanged The client has set new data into the grid using api.setRowData() or changing the rowData bound property.

Configure your gridOptions -

(rowDataChanged)="onRowDataChanged($event)"

Now you can implement your scrolling logic in onRowDataChanged

like image 132
Pratik Bhat Avatar answered Jan 02 '26 01:01

Pratik Bhat