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

Disable auto-submit of Search toolbar

1 Answer 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jakub
Top achievements
Rank 1
Jakub asked on 21 Oct 2020, 06:34 AM

Hi,

is there an option to disable the auto-submit of the data from search toolbar of the grid? It's not very efficient in our case with a remote datasource to query the DB for data on every change. We'd like to disable this feature and submit on enter/click.

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 22 Oct 2020, 04:20 PM

Hi Jakub,

We don't have API methods or configuration options dedicated to enabling the described behavior in the built-in search bar. So the way to go would be the following:

1. Use a template in the Grid's toolbar and add a textbox in the template. This textbox will be used for filtering the Grid's data instead of the built-in search bar.
2. Handle the textbox' "keydown" event.
3. In the "keydown" handler check whether the Enter key is pressed.
4. If Enter is pressed, filter the Grid's dataSource by calling its filter method passing the value (the user input) of the textbox to the method.

Regards,
Ivan Danchev
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
Jakub
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or