JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://cdn.kendostatic.com/2011.3.1129/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2011.3.1129/styles/kendo.default.min.css">
<script src="http://cdn.kendostatic.com/2011.3.1129/js/kendo.all.min.js"></script>
<input type="text" id="searchBox" /><button id="search">Search</button>
<div id="grid">
</div>
<div id="log"></div>
JavaScript
var dataSource = new kendo.data.DataSource({
type: "odata",
transport: {
read: "http://demos.kendoui.com/service/Northwind.svc/Orders"
},
schema: {
model: {
id: "ShipName",
fields: {
OrderID: { type: "number" },
ShipName: { type: "string" },
ShipCity: { type: "string" }
}
}
},
pageSize: 10,
serverPaging: true,
serverFiltering: true,
});
$("#grid").kendoGrid({
dataSource: dataSource,
pageable: true,
selectable: true,
columns: ["OrderID", "ShipName", "ShipCity"],
change: function() {
var row = this.select();
var id = row.data("id");
console.log(row)
$("#log")
.html("selected row with id= " + id + " \
, for ShipName = " + dataSource.get(id).get("ShipName"));
}
});
$("#search").click(function() {
dataSource.filter({
field: "ShipName",
operator: "contains",
value: $("#searchBox").val()
});
});