This is a migrated thread and some comments may be shown as answers.

Clear all column lever search in grid

3 Answers 776 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mukesh
Top achievements
Rank 1
Mukesh asked on 16 Sep 2019, 09:02 AM

I have implemented column level search in grid, based on some condition, i want to clear all search. How to implement that.

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 16 Sep 2019, 11:28 AM

Hello, Mukesh,

This can be done by setting the filter array in the state to an empty array and then process the data.

This will remove all filters for all columns.

This is an example:

https://stackblitz.com/edit/react-e5wtje?file=app/main.jsx

Regards,
Stefan
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Mukesh
Top achievements
Rank 1
answered on 23 Sep 2019, 09:31 AM

Thanks for the reply but we are using  dataStateChange not individual filter. Please find the below example.

https://stackblitz.com/edit/react-3dq6ve?file=app/main.jsx

If i need to clear filter value on button click or some other event how can i achieve that.

 

 

0
Stefan
Telerik team
answered on 23 Sep 2019, 10:57 AM

Hello, Mukesh,

Thank you for the example.

This can be done by only resetting the filter field of the dataState object:

https://stackblitz.com/edit/react-3dq6ve-c9aitr?file=app/main.jsx

Regards,
Stefan
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Mukesh
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Mukesh
Top achievements
Rank 1
Share this question
or