Grid colum

3 posts, 0 answers
  1. Miguel
    Miguel avatar
    2 posts
    Member since:
    Dec 2020

    Posted 08 Dec 2020 Link to this post

    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. Stefan
    Admin
    Stefan avatar
    3039 posts

    Posted 09 Dec 2020 Link to this post

    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/.

  3. Miguel
    Miguel avatar
    2 posts
    Member since:
    Dec 2020

    Posted 09 Dec 2020 in reply to Stefan Link to this post

    Hi Stefan, 

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

Back to Top