JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.229/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.229/styles/kendo.default.min.css">
<script src="http://cdn.kendostatic.com/2012.1.515/js/kendo.all.min.js"></script>
<div id="grid"></div>
JavaScript
$("#grid").kendoGrid({
dataSource: {
data: [{foo: 1}, {foo: 2}, {foo: 3}],
schema: {
model: {
id: "foo"
}
},
page: 3,
pageSize: 1
},
editable: true,
pageable: true,
columns: [
"foo",
{ command: "destroy" }
],
remove: remove
});
function remove(e) {
var isLastOnPage = this.dataSource.view().length - 1 == 0;
if (isLastOnPage) {
this.dataSource.page(this.dataSource.page() - 1);
}
}