Limiting numeric filter value in KendoReact Grid

1 Answer 311 Views
Grid
SmCoup
Top achievements
Rank 1
SmCoup asked on 22 Dec 2021, 06:33 PM | edited on 22 Dec 2021, 06:47 PM

KendoReact Grid - When specifying filter = "numeric", the grid column filter will be numeric textbox (accepting only number and have step up/down)

We have a requirement that the lower bound of this filter input cannot be negative value.

1. is there a way to configure Grid or Column to limit this numeric filter ?

2. I think I should be able to prepare a custom component (use filterCell) for this filter (need to specify min/ max attribute). However, I am not sure how to include the numeric filter operation options?

Note - The thing that I am looking for is the output that Martin prepared in ( https://stackblitz.com/edit/angular-gwuwre?file=app/app.component.ts ) for question in Angular forum ( https://www.telerik.com/forums/limiting-numeric-filter-row-column-values )

 

Thanks,

SmCoup

1 Answer, 1 is accepted

Sort by
0
Filip
Telerik team
answered on 23 Dec 2021, 03:20 PM

Hello, Sm,

It is possible to limit the numeric filter by creating a custom component that uses NumericTextBoxes as a filter and setting the min prop to zero like shown in the following example:

https://stackblitz.com/edit/react-wnnsrr?file=app%2FrangeFilterCell.jsx

Doing so specifies the smallest value that can be entered and prevents the filter from accepting negative values. 

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