This is a migrated thread and some comments may be shown as answers.

Grid colum

2 Answers 62 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Miguel
Top achievements
Rank 1
Miguel asked on 08 Dec 2020, 04:49 PM

Hello all,

In my Kendo Grid I have one column that contains a integer's array, the data for the field "groups" looks like this [1, 2, 3, 4]. The column has a custom cell and filter that help displaying the data in a more helpful way, see image attached.

<GridColumn

    field="groups"
    title="Groups"
    cell={MyPublisherGroupsColumn}
    filterCell={MyPublisherGroupFilterCell}
/>

I'm trying to apply a filter for that column with a custom "filterCell", now I have done that multiple times using no complex data types like strings, using the example provided in your documentation(https://www.telerik.com/kendo-react-ui/components/grid/filtering/#toc-custom-filter-cells) but it does not work for an array.

It is possible to implement this filter to work with more complex data types, like an array of numbers or even an array of objects, maybe implementing a custom operator? If possible could you point me in the right direction?

Thanks

 

 

 

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 09 Dec 2020, 07:53 AM

Hello, Miguel,

Currently, the built-in filter methods filterBy and process only work with a single value field.

We have an example similar to the screenshot provided:

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

Still, if the data is an array, the filtering logic has to be added by the developer based on the application business logic.

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

0
Miguel
Top achievements
Rank 1
answered on 09 Dec 2020, 08:40 PM

Hi Stefan, 

Thanks for your reply. I was able to get it working by doing the filtering manually as you suggested. 

Tags
General Discussions
Asked by
Miguel
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Miguel
Top achievements
Rank 1
Share this question
or