Filtering a grid with an OData Enum as a field

Viewed 586

I am trying to filter a grid datasource with an enum field.

It seems that the OData api has deprecated / removed the ability to have handle prefix free Enums on the server side.

I am adding the following to the grid's filter.

let fd1: FilterDescriptor = {
  field: 'orderStatus',
  operator: 'eq',
  value: "SOPSModel.OrderStatusEnum'Open'",
  ignoreCase: false
}
this.filter.filters.push(fd1);

The issue seems to be that the toOdataString function provided in kendo-data-query identifies the Enum as a string and then quotes and escapes it, which makes the server side API rejects the enum and fails.

I set up my own filter parser, which worked ok, but with the new filtering options that have been added to the Grid I really need a proper solution to this.

So, can anybody point me in the direction of how Telerik inteded OData Enums to be handled?

1 Answers
Related