How to save / restore a filter from the search box?

1 Answer 501 Views
Grid
Yuri
Top achievements
Rank 1
Yuri asked on 03 Jun 2021, 06:39 AM
My typical case
Users for working with various business objects (let's assume that this is a Product) work with a paged grid (the number of pages is from 20 to 1000). Product has 10-30 fields (Name, Type, Code, etc.).
The user using the search box selects for example by Type the Product they are interested in and adds the Product with the same Type using a complex form on a separate page. After recording the added Product, the user returns to the page with the paged grid, updates the data, and wants to return to the same search box filter that was before the addition.
How do I save the filter from the search box before entering a new Product and restore it after adding a new Product to the database?

1 Answer, 1 is accepted

Sort by
0
Hristian Stefanov
Telerik team
answered on 07 Jun 2021, 02:44 PM

Hello Yuri,

We have a feature request in our feedback portal about Including filter descriptors from the SearchBox in the State. You can see there why the SearchBox is not part of the state and what is the workaround for saving it.

In short, there are possible ways to achieve the desired result such as:

  • Use the OnRead event as shown in the feature request above.
  • Implement a custom search box and use the bound value.

We have also an open feature request for the ability to get and set the searchbox value programmatically. With that, you would be able to save the user input from it and apply it after loading the grid. I have already added your vote there on your behalf, this way, the priority of the requested feature is increased, and we are tracking this interest.

I hope this helps, and if you have any other questions, please let me know.

Thank you.

Regards,
Hristian Stefanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Yuri
Top achievements
Rank 1
Answers by
Hristian Stefanov
Telerik team
Share this question
or