Kendo grid filter from value range

1 Answer 742 Views
DropDownList Filter Grid
P
Top achievements
Rank 1
P asked on 12 Sep 2022, 02:53 PM

Hi,

I have a question for you:
I would like to create a filter for one column of my Grid. The values of this column are integers, but the values are not visible for the users. They see only an icon depending on the value's range. (see the linked image)

 

For example:
If the value is 89, the user sees an icon and the tooltip for that is "Very good".

We have 4 ranges:
0-50 Bad,

51-70 OK,

71-85 Good,

86-100 Very good

How can I create a filter, where only the 4 text can be selected from a dropdown, but is filters for the range represented by the text?

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Aleksandar
Telerik team
answered on 15 Sep 2022, 07:37 AM

Hello,

The Filter menu customization Demo show how you can implement a custom editor for the Filter Menu. In addition, you can add a Filter event handler where the filtering logic can be set. The event parameters provide details on the applied filter and the filtered field. As a possible approach to achieve the desired result you can:

  • check if the desired field is being filtered
  • prevent the default behavior if so
  • modify the applied filter by updating the filter configuration
  • call the Grid's dataSource filter method, passing the modified filter

Regards,
Aleksandar
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/.

P
Top achievements
Rank 1
commented on 19 Sep 2022, 07:03 AM

Hi Aleksandar,

Thank you for the answer. I'll try your suggestion.

Regards,
Peter

Tags
DropDownList Filter Grid
Asked by
P
Top achievements
Rank 1
Answers by
Aleksandar
Telerik team
Share this question
or