GridColumnMenuCheckboxFilter, a column has one id but has one-to-many making the filter not work properly.

1 Answer 107 Views
Filter  Grid
Samuel
Top achievements
Rank 1
Samuel asked on 14 Apr 2022, 06:22 PM

If one column has an array with multiple options in a way as ["item1', "item2", "item3"]. 

I can see that yes if a column has one-to-one it works, but if its one-to-many, how can I make the filter just show unique items and filter by such items, for instance I want to have item1, item2, and item 3 show as different selectable options in the filter and also filter by such.

 

In my example I have the mas 18.0000, 17.000, 18, 19

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

 

 

 

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 18 Apr 2022, 08:33 AM

Hello Samuel,

Thank you for reaching out to us.

The KendoReact Grid is designed to work with flat data, which is why it does not support one-to-many data operations out-of-the-box. It is however possible to modify the filter expression prior to applying it to the data and add custom filter operator that will execute custom logic. You can take a look at the following example for modifying the filter expression to handle array field values:

Hope this helps.

 

Regards,
Konstantin Dikov
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.

Tags
Filter  Grid
Asked by
Samuel
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or