karan
asked on 26 Aug 2021, 02:55 AM
| edited on 26 Aug 2021, 02:56 AM
Kendo Grid Filter : kendoGridFilterMenuTemplate should allow to set min length for filter. For example , I need to do filter only when if user enters min 3 chrachters.
How can we achieve this?
1 Answer, 1 is accepted
0
Silviya
Telerik team
answered on 30 Aug 2021, 04:26 PM
Hi Karan,
In general, when a FilterMenuTemplateDirective is used while creating filters, the developer can place whatever satisfies the given use-case scenario inside it. Including a Kendo TextBox, as I'd suggest in this particular case.
Then the dev would have control over the input and can add whatever limitations are deemed necessary. So, if the developer wants to prevent the filter from triggering when the number of characters in the input is <= 3, then this can be done inside the filterChange method.
Placing a TextBox component or a regular HTML input field also allows to limit the characters that can be entered by the user with the following properties:
The purpose of the example is to steer you in the right direction. Please keep in mind that further modifications may be required to adjust the example to suite the specific use-case scenario. Indeed the example isn't fully tested and should be used at the developer's own discretion.
I hope the information provided helps and steers you in the right direction.
Regards,
Silviya
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/.