48793

How to get the number of filtered rows in ag-Grid?

Question:

I have an <a href="https://www.ag-grid.com/" rel="nofollow">ag-Grid</a> 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.

Answer1:

gridOptions.api.getModel().rootNode.childrenAfterFilter.length

You should check out what else is available to you under rootNode, there are a few arrays that might be useful to you

Recommend

  • docker.sock permission denied
  • How to get the number of filtered rows in ag-Grid?
  • Connect string value to a corresponding variable name
  • Marshalling string from c# to c++
  • Entity Framework 4 eager loading not working at all!
  • sqoop job fails when trying to read table argument
  • R and approximate match in the column's name
  • how to dynamically set the row height and column width in ag-grid
  • MDX Get UserName Where UserID
  • ag-grid column headers stacked to the left
  • trigger.io - Can't create ipa-file anymore
  • Laravel - Dynamic relationship using hasManyThough() and unique merge
  • App Script HtmlService use with font like Google Web Fonts?
  • Trying to find the last non-empty cell in a specific row/range over multiple sheets
  • Is there a greater chance to collide when comparing GUIDs based on a hash vs \"Guid.NewGuid()?
  • Is it possible to collect a stream to two different collections using one line?
  • How to start server for Selenium grid Java Maven setup
  • Allocating a 2D contiguous array within a function
  • pythonanywhere - How do I use websockets to transmit messages as per the web2py messaging example?
  • Dynamically load css stylesheet and wait for it to load
  • Defined variables not working in javascript files when I use getScript
  • Can't remove headers after they are sent
  • Azure table store snapshot/backup capability
  • How to synchronize jQuery dialog box to act like alert() of Javascript
  • How to disable all widgets inside Panel or inside Composite?
  • Security issues with PHP's Readfile method
  • Chrome doesn't support silverlight anymore? How to solve this?
  • Android fill_parent issue
  • vba code to select only visible cells in specific column except heading
  • jquery mobile loadPage not working
  • Do I've to free mysql result after storing it?
  • Properly structure and highlight a GtkPopoverMenu using PyGObject
  • Unanticipated behavior
  • Transpose CSV data with awk (pivot transformation)
  • using conditional logic : check if record exists; if it does, update it, if not, create it
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • Can't mass-assign protected attributes when import data from csv file
  • Sorting a 2D array using the second column C++
  • Unable to use reactive element in my shiny app
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize