test filter
by valchev
HTML
<script src="http://cdn.kendostatic.com/2012.1.515/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.default.min.css">
<div id="grid"></div>
JavaScript
var dataSource = new kendo.data.DataSource({
transport: {
read: {
//using jsfiddle echo service to simulate JSON endpoint
url: "/echo/json/",
dataType: "json",
type: "POST",
data: {
// /echo/json/ echoes the JSON which you pass as an argument
json: JSON.stringify([
{id: 1, foo: 1, bar: "bar 1"},
{id: 2, foo: 2, bar: "bar 2"},
{id: 3, foo: 3, bar: "bar 3"},
{id: 4, foo: 4, bar: "bar 4"},
{id: 5, foo: 5, bar: "bar 5"}
])
}
},
destroy: {
url: "/echo/json/",
dataType: "json"
},
update: {
url: "/echo/json/",
dataType: "json"
},
parameterMap: kendo.data.transports.odata.parameterMap,
cache: true,
dataType: "json"
},
schema: {
id: "id"
},
serverFiltering: true
});
$("#grid").kendoGrid({
dataSource: dataSource,
filterable: true
});