I am trying to display the count of the field in the footerTemplate. Follow is the fiddle:
http://jsbin.com/ajoyug/8/edit
However, without the footerTemplate it works fine. But as soon as I add the footerTemplate, it stops working.
Inside the aggregateResult object I am getting the value of count. But then how shall I add it to the footerTemplate?
Kindly help me out.
Thanks!!
I could not explain why it's not working. But I have tried doing your example by other way and it works well.
Here goes the link.
http://jsbin.com/ajoyug/35/edit
The problem is with your approach the grid is rendered twice, the first time on Kendo UI
init
ialization (implicit during the firstbind
) and the second when youbind
the actual data.The first time the data is still not available and then it fails.
If anyway you want to follow that path you should do:
i.e. check if
data.age
is available and then is when you print it.Otherwise, I recommend following @UmankantPatil suggestion and do not use
data-*
but JavaScript for initializing the widgets and binding data.Check it in the modified version of your JSBin here