pythonplotlyag-gridplotly-dashplotly-python

Is it possible to get the filtered rows of an Ag Grid in dash-ag-grid?


In a callback I'd like to get the rows displayed in the AgGrid after all of the native filters are applied.

Currently, if I apply some filters and get the data: State("ag_grid_table", "rowData")

I get the entire data. In a dash DataTable I'd use:

State("derived_virtual_data", "data")

Solution

  • From the documentation

    virtualRowData (list of dicts; optional): The rowData in the grid after inline filters are applied.

    rowData (list of dicts; optional): (Client-Side Row Model only) Set the data to be displayed as rows in the grid.

    https://dash.plotly.com/dash-ag-grid/reference

    So to get the entire data set you'd use rowData and to get the filtered rows you'd use virtualRowData.