setDataSource
Sets the DataSource of an existing ListView and rebinds it.
Parameters
dataSource kendo.data.DataSource
<div data-role="view">
Rebind
<ul id="listView" data-role="listview" data-template="foo-template" data-source="foo" data-style="inset">
</ul>
</div>
<script id="foo-template">
#: name #
</script>
<script>
var foo = new kendo.data.DataSource({ data: [ { name: "foo" } ] });
var bar = new kendo.data.DataSource({ data: [ { name: "bar" } ] });
function rebindListView() {
$("#listView").data("kendoMobileListView").setDataSource(bar);
}
new kendo.mobile.Application();
</script>