Last Updated: 23 Feb 2023 07:29 by ADMIN
Created on: 24 Apr 2020 19:00
Category: DataQuery
Type: Feature Request
Allow the same Filter Operation strings that works with process() to work with toODataString()

Current behavior

Currently, toODataString() does not fix filter operators like process() does for the grid data.
Our team is using OData to do server side filtering on kendo grids.
When given the filter operator 'equals', the current implementation of the code will error out when trying to create a serialized query string for OData operations. That is because it is actually trying to look for the operator 'eq' to create the string.

This is because the toODataString does use the operatorMap that is in filter.operator.js.
process(), used for client-side paging however does. And will fix the value before applying the operation.

Expected behavior

What I would expect toODataString to do. Is make use of the same correcting that process() does.
So my filters in the State object can use either 'equals' or 'eq'.
This stumped me for a bit, and would be an easy fix. I think changing this would save people some time. And make the functions used for server-side and client-side paging, uniform.

Minimal reproduction of the problem with instructions
In this example, you can see changing 'equals' to 'eq' will make it stop erroring.

TLDR -> toODataString() doesn't understand 'equals', like process() does.

Dimiter Topalov
Posted on: 23 Feb 2023 07:29


We are declining this feature request due to low customer demand.

Dimiter Topalov
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

T. Tsonev
Posted on: 01 May 2020 15:34

Hi Chase,

Thank you for reporting this discrepancy in the behavior of process and toODataString. The process method normalizes the filters internally by calling a helper function that is not part of the public API. We'll review if this can be done for toODataString without introducing breaking changes.

In the meantime you can use this helper function to workaround this issue:

import { normalizeFilters, toODataString } from '@progress/kendo-data-query';
// ...
private normalizeStateFilters() {
  if (this.state.filter) {
    this.state.filter = normalizeFilters(this.state.filter);

See updated example.

Best Regards,
T. Tsonev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.