The problem is your approach when the grid is rendered twice, the first time on the Kendo UI init user interface (implicit during the first bind ), and the second when you bind actual data.
The first time the data is still unavailable, and then it fails.
If you want to follow this path, you must:
<div id="myListView" data-role="grid" class="transaction-grid" data-columns="[ { field: 'name', title: 'Name', width:'20%' }, { field: 'age', title: 'Age' , width:'35%', footerTemplate: 'Total Count: # if (data.age) { # #= age.count # # } #' } ]" data-bind="source: dataSource"> </div>
i.e. check if data.age is available and then when printing. A.
Otherwise, I recommend the following @UmankantPatil suggestion and do not use data-* , but JavaScript to initialize widgets and binding data.
Check it out in a modified version of your JSBin here
source share