Here is my html for the my list view:
<ul id="best-in-klas-products-list-view"></ul>
I have the following Header Template:
<script id="best-in-klas-products-header-template" type="text/x-kendo-template">
# if ( klas.bestInKlasProductsViewModel.checkForBestInKlas(value) ) { #
<div class="list-view-group-header">
<div class="group-header-table-container">
<div><img src="images/best-in-klas.svg" class="best-in-class-logo" /></div>
<div>
<div class="market-segment-title">#: klas.marketSegmentName #</div>
<div class="award-title">Best in KLAS</div>
</div>
</div>
</div>
# } else { #
<div class="list-view-group-header">
<div class="group-header-table-container">
<div><img src="images/category-leader.svg" class="best-in-class-logo" /></div>
<div>
<div class="market-segment-title">#: klas.marketSegmentName #</div>
<div class="award-title">Category Leaders</div>
</div>
</div>
</div>
# } #
</script>
This is my script for the list view:
$('#best-in-klas-products-list-view').kendoMobileListView({
headerTemplate: $('#best-in-klas-products-header-template').text(),
template: $('#best-in-klas-products-template').text(),
dataSource: new kendo.data.DataSource({
type: 'json',
transport: {
read: url
},
group: {
field: 'groupByField', dir: "desc"
},
sort: [
{ field: "ranking", dir: "asc" }
]}),
filterable: false,
click: function (e) {
...
}
});
The Code is simple clean, I Love it. My problem is that I need to display additional in my header template. We have additional award categories I need to display additional information in the header template. What's the best way to accomplish this? Any help would be greatly appreciated.