"#=count#" not working in Footer Template

4 posts, 0 answers
  1. Lisa
    Lisa avatar
    35 posts
    Member since:
    May 2011

    Posted 01 Aug Link to this post

    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

     

     

  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 03 Aug Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
  4. Lisa
    Lisa avatar
    35 posts
    Member since:
    May 2011

    Posted 03 Aug in reply to Boyan Dimitrov Link to this post

    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?

  5. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 05 Aug Link to this post

    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.
     
Back to Top
Kendo UI is VS 2017 Ready