I have an ag-Grid with filtering option.
How to get the number of filtered rows without using forEachNodeAfterFilter
callback?
I want to enable a button only if there is a filtered row, and i don't want to perform a foreach loop in the background every time.
Api the AgGrid: getDisplayedRowCount() Returns the total number of displayed rows.
The easiest way to get a Row Node is by its Row ID. The ID is either provided by you using the grid callback getRowId() , or generated by the grid using an internal sequence.
The gridOptions object is a 'one stop shop' for the entire interface into the grid, commonly used if using plain JavaScript. Grid options can however be used instead of, or in addition to, normal framework binding. The example below shows the different types of items available on gridOptions .
Grid Cells with Progress Bar To show a progress bar in cells of specific column, you need to set the editorType field of column object to Progress. After that, you can set the cell value field with a number from 0 to 100. This will update the progress bar in each cell separately based on the cell value.
What you are probably looking for is:
gridOptions.api.getDisplayedRowCount()
The actual number of rows after the filtering event is trivially the number of displayed rows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With