This is a migrated thread and some comments may be shown as answers.

"#=count#" not working in Footer Template

3 Answers 783 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lisa
Top achievements
Rank 1
Lisa asked on 01 Aug 2016, 08:19 PM

Hi - I want to add counts on a grid, and am copying code I've used on another grid with no problems.

Here is my column definition for the field in question, it gives me an error that "count" is not defined.

{ field: "SchoolYear", title: "Assessment Year", aggregates: ["count"], footerTemplate: "Count: #=count#", groupFooterTemplate: "Count: #=count#", groupHeaderTemplate: " #=value# - Count: #=count#"},

If I remove the "#=count#", and have this it renders fine, just no count of course

{ field: "SchoolYear", title: "Assessment Year", aggregates: ["count"], footerTemplate: "Count: ", groupFooterTemplate: "Count: #=count#", groupHeaderTemplate: " #=value# - Count: #=count#"},

What I don't understand is why I can use "#=count#" in the groupFooter and groupHeader templates and it's fine.

Any ideas?

Thanks

Lisa

 

 

3 Answers, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 03 Aug 2016, 11:10 AM

Hello Lisa,

 

Could you please try to replicate the described problem with http://dojo.telerik.com/AmUxi example? Maybe I am missing something, but the count aggregate is shown in the footer template. 

 

Regards,
Boyan Dimitrov
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Lisa
Top achievements
Rank 1
answered on 03 Aug 2016, 02:45 PM

You example does work, and I can get the code to work on a couple of my grids just fine.  I don't understand why it's not working in some cases, and why using the count in the group templates is fine.  Could it be something like a timing issue on getting the data somehow?

0
Boyan Dimitrov
Telerik team
answered on 05 Aug 2016, 12:51 PM

Hello Lisa,

 

The easiest way is to provide a sample dojo example that replicates the problem.  The same approach works absolutely fine when grid is populated with remote data. Please review our Grid / Aggregates demo. 

 

Regards,
Boyan Dimitrov
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Grid
Asked by
Lisa
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Lisa
Top achievements
Rank 1
Share this question
or