Pending Review
Last Updated: 06 Dec 2018 08:38 by ADMIN
Zachary
Created on: 29 Nov 2018 16:42
Category: Data Source
Type: Feature Request
2
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
            });

1 comment
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.