1

After adding or deleting the row in ag grid. Column filter values are not reflecting accordingly.

Let say,

Default GRID rows are

a

b

While deleting the row b using reload() method, grid is updated as below

a

But column filter still shows b

a

b

How to refresh the column filter as well.

Any expert advise please?

1 Answer 1

1

You should reset filter values for the specific column filter after the update of the grid:

params.api.getFilterInstance(params.colDef.colId).resetFilterValues()

as documented:

resetFilterValues(): Useful if you want to rebuild the filter options based on the underlying data

Sign up to request clarification or add additional context in comments.

3 Comments

This is not working. It returns an error like "this.gridApi.getFilterInstance(...).resetFilterValues is not a function"
One observation here is while adding or deleting the grid values, first time when open the column filter values are updated properly. Issue comes from second time onward after adding or deleting the values, no reset the filter values.
You got an error because you don't have the instance of the grid, please provide plunker with your example.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.