setDataSource
Sets the DataSource of an existing ScrollView and rebinds it.
Parameters
dataSource kendo.data.DataSource
<div id="home" data-role="view" data-model="viewModel">
<div id="scrollview" data-role="scrollview" data-source="ds" data-template="tmp"></div>
Button
</div>
<script id="tmp" type="text/x-kendo-template">
<div>#: foo #</div>
</script>
<script>
var ds = new kendo.data.DataSource({
data: [{foo: 1}, {foo: 2}]
});
function onClick() {
//change dataSource
$("#scrollview").data("kendoMobileScrollView")
.setDataSource([{foo: 3}, {foo: 4}, {foo: 5}]);
}
var app = new kendo.mobile.Application();
</script>