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

Trim entry entered into a search panel input box before data is searched

1 Answer 152 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Morten
Top achievements
Rank 2
Iron
Iron
Iron
Morten asked on 05 Dec 2020, 04:51 PM

Hi devs and support.

I'm using the grid search panel in a grid toolbar template (https://www.telerik.com/forums/search-panel-and-toolbar-template)

If the user paste "1234 " (with a trailing space) into the search input box the row with id="1234" is not found.

Is there a clever way to do a .trim() before the entered/pasted value is used to search the data?

 

Best regards

Morten

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 08 Dec 2020, 03:00 PM

Hello Morte,

The built-in filter option via the Search Panel does not trim trailing spaces. However, this can be implemented by overriding the internal Search Panel functionality. There is a good article demonstrating how this can be achieved:

The above works in the desired way plus searching apply multiple values.

Regards,
Nikolay
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
Morten
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Nikolay
Telerik team
Share this question
or