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

Grid not updating when filtering a Data Source

2 Answers 178 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Gabriel
Top achievements
Rank 1
Gabriel asked on 24 Nov 2011, 12:41 AM

I'm trying to filter a data source with the data bound to a remote source as per the Grid/Remote-data.html sample.
I've made some mods and nothing seems to happen. I'm trying to filters the results by ShipName.

<script>
   $(document).ready(function() {
      var sharableDataSource = new kendo.data.DataSource({
        type: "odata",
        transport: {
        },
        pageSize: 10,
        serverFiltering: true,
        serverPaging: true,
        serverSorting: true,     
      });
 
      $("#grid").kendoGrid({
         dataSource: sharableDataSource,
         height: 250,
         scrollable: true,
         sortable: true,
         pageable: true,
         columns: ["OrderID", "CustomerID", "Freight", "ShipName", "ShipCity"]
      });
                        
      $("#apply").live("click", function() {
         sharableDataSource.filter({ field: "ShipCity", operation: "eq", value: "Reims" });
      });
   });
 
</script>

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 24 Nov 2011, 09:23 AM
Hi Gabriel,

 There is a typo in your filter declaration - you should be using "operator" instead of "operation". Here is a live demo showing a working implementation.

All the best,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Gabriel
Top achievements
Rank 1
answered on 24 Nov 2011, 10:57 PM
Oops! Thanks for that. This has been bugging me for hours!
Tags
Data Source
Asked by
Gabriel
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Gabriel
Top achievements
Rank 1
Share this question
or