Label for boolean filter

2 Answers 67 Views
Filter  Grid
Bernd
Top achievements
Rank 5
Bronze
Bronze
Bronze
Bernd asked on 11 Nov 2021, 02:22 PM
I have a Grid setup and some of the fields are boolean. I have added a filter to the columns. For the boolean fields the filter now shows "Is true" and "Is false". Is it possible to change these labels to something else?

2 Answers, 1 is accepted

Sort by
0
Accepted
Filip
Telerik team
answered on 12 Nov 2021, 01:05 PM

Hello, Bernd,

It is possible to change the labels of the boolean filter by using KendoReact Grid internationalization feature.  We prepared an example that illustrates this approach:

https://stackblitz.com/edit/react-h1f8z2-h9nz6v?file=app/main.jsx

Custom messages can be applied by setting the message keys default values, which in your case are

grid.filterBooleanAll	
grid.filterIsFalse	
grid.filterIsTrue	

I hope this helps. 

Regards, Filip Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Bernd
Top achievements
Rank 5
Bronze
Bronze
Bronze
answered on 15 Nov 2021, 04:19 PM
Yes, this would work but how would it work if I have multiple boolean fields and would like to name the filters seperatly for each field? Would that work too?
Filip
Telerik team
commented on 16 Nov 2021, 02:17 PM

Hi, Bernd,

It is possible to change the names of multiple filters as well by using a custom filter cell, like shown in the following example:

https://stackblitz.com/edit/react-4x2htv-mumnp7?file=app%2Fsample-products.jsx

Regards,
Philip

Tags
Filter  Grid
Asked by
Bernd
Top achievements
Rank 5
Bronze
Bronze
Bronze
Answers by
Filip
Telerik team
Bernd
Top achievements
Rank 5
Bronze
Bronze
Bronze
Share this question
or