Hi...I saw some examples on the internet regarding data binding using json in ListView but those things are not working in my case. I have a Controller named "Contact" and there is method named "Read", in Read () method I get the Contact list which I want to show in ListView in Mobile. Here is my View Code...
<div data-role="view" id="tabstrip-profile" data-title="Dashboard" data-layout="mobile-tabstrip"
data-init="initListView">
<ul data-role="listview" data-style="inset" data-type="group">
<li>
<ul id="contactList">
</ul>
</li>
</ul>
</div>
<script type="text/javascript">
var deviceJDS = new kendo.data.DataSource({
transport: {
read: {
contentType: "application/json; charset=utf-8",
type: "GET",
data: "{}",
dataType: "json",
url: "/Contact/Read"
}
},
schema: {
data: "d"
}
});
function initListView(e) {
e.view.element.find("#contactList").kendoMobileListView({
template: "<strong>#:data.DisplayName#</strong>",
dataSource: deviceJDS
});
}
var app = new kendo.mobile.Application(document.body);
</script>
<div data-role="view" id="tabstrip-profile" data-title="Dashboard" data-layout="mobile-tabstrip"
data-init="initListView">
<ul data-role="listview" data-style="inset" data-type="group">
<li>
<ul id="contactList">
</ul>
</li>
</ul>
</div>
<script type="text/javascript">
var deviceJDS = new kendo.data.DataSource({
transport: {
read: {
contentType: "application/json; charset=utf-8",
type: "GET",
data: "{}",
dataType: "json",
url: "/Contact/Read"
}
},
schema: {
data: "d"
}
});
function initListView(e) {
e.view.element.find("#contactList").kendoMobileListView({
template: "<strong>#:data.DisplayName#</strong>",
dataSource: deviceJDS
});
}
var app = new kendo.mobile.Application(document.body);
</script>