このコードの空のグリッドを取得しています:
<div id="grid"></div>
<script>
$(document).ready(function () {
var crudServiceBaseUrl = '/api/notes/';
GridDataSource = new kendo.data.DataSource({
transport: {
read: crudServiceBaseUrl,
},
});
$("#grid").kendoGrid({
dataSource: GridDataSource.rows,
navigatable: true,
pageable: true,
height: 300,
toolbar: ["create", "save", "cancel"],
columns: [
{ field: "id", title: "ID", width: 150 },
{ field: "name", title: "Book", width: 150 },
{ field: "author", title: "Author", width: 100 },
{ command: "destroy", title: " ", width: 110 }
],
editable: true
});
});
</script>
</div>
JSON は次のようになります。
{"total": 6, "rows": [{"id": "AA", "name": "Foo", "author": "Bar"}, ...