autoBind Boolean
(default: true)
If set to false
the widget will not bind to the DataSource during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the DataSource specified in the configuration.
Applicable only in data bound mode.
<div data-role="view" data-stretch="true">
<div data-role="scrollview"
data-auto-bind="false"
data-source="dataSource"
data-template="scrollview-template"
data-content-height="120px"
data-enable-pager="false">
</div>
</div>
<script id="scrollview-template" type="text/x-kendo-template">
<div style="width: 110px; height: 110px; background-image: #=setBackground(ProductID)#;"></div>
<p>#= ProductName #</p>
</script>
<script>
var app = new kendo.mobile.Application();
var dataSource = new kendo.data.DataSource({
type: "odata",
transport: {
read: {
url: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Products"
}
},
serverPaging: true,
pageSize: 30
});
function setBackground(id) {
return "url(https://demos.telerik.com/kendo-ui/content/web/foods/" + id +".jpg)";
}
</script>