Declined
Last Updated: 22 Jun 2021 13:58 by ADMIN
Zachary
Created on: 29 Nov 2018 16:42
Category: Data Source
Type: Feature Request
4
Add support for IN operator for odata-v4

http://odata.github.io/WebApi/#04-26-InOperator

 

OData v4 now supports the IN operator as a short hand for multiple or queries (as of http://docs.oasis-open.org/odata/new-in-odata/v4.01/cn01/new-in-odata-v4.01-cn01.html#_Toc485385090 ). This could help to change code such as:


var selectedStations = $("#cmbStations").data("kendoMultiSelect").dataItems();
            var stationIds = [];
            for (var i = 0; i < selectedStations.length; i++) {
                stationIds.push({
                    field: "StationId",
                    operator: "eq",
                    value: stationId
                });
            }
            dataSource.filter({
                logic: "or",
                filters: stationIds
            });

into a much cleaner:


var selectedStations = $("#cmbStations").data("kendoMultiSelect").dataItems();
            var stationIds = [];
            for (var i = 0; i < selectedStations.length; i++) {
                stationIds.push(selectedStations[i].StationId);
            }
            dataSource.filter({
                field: "StationId",
                operator: "in",
                value: stationId
            });

2 comments
ADMIN
Angel Petrov
Posted on: 22 Jun 2021 13:58

Hi,

The in operator is specific to OData-v4 and integrating it is doable but since it will lack integration in the UI it would be better to handle things manually. For that purpose one can execute the code which is demonstrated for pushing the 'in' filter and inside the parameterMap function modify the parameters and adjust the filtering.

Regards,
Angel Petrov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

ADMIN
Veselin Tsvetanov
Posted on: 06 Dec 2018 08:38
Hi Zachary,

Thank you for your input on improving Kendo DataSource utility.

We will keep tracking the interest expressed by the community on the suggested enhancement. If it gains popularity we will consider the appropriate way in which to provide such support.

Regards,
Veselin Tsvetanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.