I am using KendoUI web controls with KO binding using knockout-kendo.js in my project. It works like a charm with kendo Grid.
However, at couple of places I want to use Html table whose rows are bound with kendo datasource inside my VM using KO bindings. In other words, I want something similar to ko's foreach binding using kendo datasource.
I referred http://jsfiddle.net/rniemeyer/qtx3J/ as a sample but when I integrate kendo datasource here, it stops working.
var viewModel = ko.observable({
persons: new kendo.data.DataSource({
schema: {
model: { id: "PersonId" },
data: "Data",
total: "Total",
},
transport: {
read: {
url: "/api/PersonApi/Get",
dataType: "json",
},
},
pageSize: 2,
serverPaging: true,
serverSorting: true,
}),
itemTemplate : function (item) { return "view"; },});
Thank you for your help!
However, at couple of places I want to use Html table whose rows are bound with kendo datasource inside my VM using KO bindings. In other words, I want something similar to ko's foreach binding using kendo datasource.
I referred http://jsfiddle.net/rniemeyer/qtx3J/ as a sample but when I integrate kendo datasource here, it stops working.
var viewModel = ko.observable({
persons: new kendo.data.DataSource({
schema: {
model: { id: "PersonId" },
data: "Data",
total: "Total",
},
transport: {
read: {
url: "/api/PersonApi/Get",
dataType: "json",
},
},
pageSize: 2,
serverPaging: true,
serverSorting: true,
}),
itemTemplate : function (item) { return "view"; },});
Thank you for your help!