This is a migrated thread and some comments may be shown as answers.

$Filter is always empty using odata?

1 Answer 147 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Patrick Rioux
Top achievements
Rank 1
Patrick Rioux asked on 16 Nov 2011, 04:37 AM
Hi,
I'm trying to add server-side filtering using the odata transport method.
The '$filter=' parameter is always blank on the url.
Maybe this is something not supported in Beta 2 or I have a use a bad syntax?
Thank you.

Here my Kendo grid definition:
  $("#grid1").kendoGrid({
                     dataSource: {
                            type: "odata",
                            // Filter always empty with odata ?
                            serverFiltering: true,
                            filter: [{
                                field: "YearSalesTarget",
                                operator: "ge",
                                value: 5000}],
                            // Filter always empty with odata ?
                            transport: {
                                 read: "csp/mediapool/public/dt.common.odata.RequestServer.cls
                            },
                            pageSize: 10,
                            serverPaging: true,
                            serverSorting: true
                        },
                        selectable: "multiple",
                        scrollable: false,
                        sortable: true,
                        pageable: true,
                        groupable: false,
                        rowTemplate: kendo.template($("#rowTemplate").html()),
                        columns: [{field:"SalesrepId",title:"Salesrep"},
                                  {field:"SalesrepName",title:"Salesrep Name"},
                                  {field:"StartDate",title:"Start Date"},
                                  {field:"StreetName",title:"Street"},
                                  {field:"State",title:"State"},
                                  {field:"YearSalesTarget",title:"Year Sales $"},
                                  {title:"Edition"}]
                });

1 Answer, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 16 Nov 2011, 09:25 AM
Hello Patrick,

The cause for the behavior you have described is incorrect filter operator value. Please set it to gte instead ge.

Regards,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Patrick Rioux
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or