Update Aggregate on Change with Locked columns

3 posts, 0 answers
  1. Jakub Wilk
    Jakub Wilk avatar
    32 posts
    Member since:
    Nov 2003

    Posted 06 Sep 2016 Link to this post


    I followed this example of updating aggregates on change:


    However there is a problem with frozen (locked) columns as shown in this dojo:


    Note that upon change, ".k-footer-template" is replaced with a "normal" footer i.e. the footer that would be normally displayed if the columns were not locked. The effect is that the cells move to the left.

    Is there a way to generate only the footer inside the ".k-grid-footer-wrap" without the locked cells?

    Also it appears that method "footerTempalte" in the Grid object is not documented anywhere in the JavaScript api (http://docs.telerik.com/kendo-ui/api/javascript/ui/grid)

  2. Jakub Wilk
    Jakub Wilk avatar
    32 posts
    Member since:
    Nov 2003

    Posted 06 Sep 2016 Link to this post

    I attach two images showing the problem
  3. Dimiter Topalov
    Dimiter Topalov avatar
    1067 posts

    Posted 07 Sep 2016 Link to this post

    Hi Jakub,

    The issue has already been resolved in another thread, but I will also post the answer here, so others can benefit too:

    The footerTemplate() method is not documented, because it is intended for internal use only.

    The described behavior occurs, because in locked columns scenarios, to tables (bodies, footers, headers) are created - one for the locked content, and one for the regular one. This leads to two elements with the .k-footer-template class.

    The footerTemplate() method on the other hand returns a string for the whole footer regardless of whether there are frozen columns or not.

    The described scenario is not supported out-of-the-box, but the workaround is to programmatically get only what you need from the string, returned by the footerTemplate() function, and replace with it the contents of the regular footer template.

    I have modified the provided dojo with a sample implementation of the suggested approach:


    Please mind that the involved custom logic should be adjusted accordingly every time the grouping configuration, or the number of locked columns is modified.

    Dimiter Topalov
    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top