How to get the Filtered value of Ag-Grid as string

56 Views Asked by At

enter image description here

I have the above column api data, from which I want to get the applied filtered value as string, using the agGridColumnApi?.api?.filterManager?.allFilters but getting undefined as result.

I have the above column api data, from which I want to get the applied filtered value as string, using the agGridColumnApi?.api?.filterManager?.allFilters but getting undefined as result.

2

There are 2 best solutions below

0
Naren Murali On

Generally we use the getFilterModel to get all the filters from aggrid, docs for filter api here

// Gets filter model via the grid API
const model = api.getFilterModel(); 

// Sets the filter model via the grid API
api.setFilterModel(model);
0
Dinesh Kumar On

api.filterManager.advancedFilterService.appliedExpression Worked for me.