JSFiddle - React, Tailwind, and code Playground
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.515/styles/kendo.mobile.all.min.css">
<div data-role="view" data-init="EmployeeInit" >
<ul id="EmployeeList">
</ul>
</div>
JavaScript
function EmployeeInit() {
var ds = new kendo.data.DataSource({
schema: {
data: "d",
model: {
id: "ID",
fields: {
ID: {
type: "number"
},
Name: {
type: "string"
},
}
},
},
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({
d: [
{ ID: 1, Name: "John" },
{ ID: 2, Name: "Jane" },
{ ID: 3, Name: "Jack" }
]})
}
}
}
});
$("#EmployeeList").kendoMobileListView({
dataSource: ds,
template: "#: Name #"
});
}
var app = new kendo.mobile.Application(document.body);