Multiple Filter in toODataString

1 Answer 8 Views
Data Query Grid
Ali
Top achievements
Rank 1
Ali asked on 29 Mar 2024, 08:32 PM | edited on 29 Mar 2024, 08:33 PM

Hi,

I am working on Kendo React toODataString with Odata .net core.

I am facing a problem when i am call custom filter with Kendo Grid Filter.

Manual Filter:

filter=clients/any(c:c/id eq 2)

it is possible to merge two filter auto using '@progress/kendo-data-query' or can i add my manual query in kendo react datastate like this?

dataState: {
    take: 10,
    skip: 0,
    filter: {
        filters: [{
            logic: "and",
            filters: [{
                field: "clients",
                operator: "any",
                value: {
                    field: "id",
                    operator: "eq",
                    value: 2
                }
                }]
        }]
    },
    
}
the above code is not working at all and i am facing errors.

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 02 Apr 2024, 08:16 AM

Hello Ali,

The "toODataString" helper method will work only with the default operators, so if you want to include a custom operator you will have to manually add it to the query string or build it from scratch using the DataState of the Grid.

 

Regards,
Konstantin Dikov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

Tags
Data Query Grid
Asked by
Ali
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or