Reputation: 117
I want to show total number of rows displayed vs total result count in ag grid with server side row model?
Upvotes: 1
Views: 3809
Reputation: 2151
params.api.getDisplayedRowCount()
will give you rows displayed in DOM(even if they are not visible due to grid size). use this once the data in updated in grid.
regarding total rows it depends on you what object you send from server to ag grid. you can send total rows count from server as a property which you can use on UI(this will not changed since i am guessing its total number of rows on server)
you can use gridOptions.api.getInfiniteRowCount()
when using rowModelType = 'infinite'
Upvotes: 1