Unplanned
Last Updated: 06 Apr 2020 07:57 by ADMIN
Martin
Created on: 30 Mar 2020 09:13
Category: TreeList
Type: Feature Request
0
More flexible footer templates for aggregates

In a Grid, you can include aggregates from other columns in a footer template. Please add this feature to TreeList.

Also, other useful features would be:

1. Enable or hide footers for expanded nodes. Currently, if there are any footer templates defined, then a footer row is rendered for each expanded node. Please can we have some control over which of these footer rows are rendered. For example, having them rendered only at the top level.

2. Provide some means of controlling whether or not to include child rows' values in the aggregates.

For example, I currently have a TreeList where some values are already the totalled across any child rows - this totalisation is done by our business layer. However, we want to include a Grand total in the footer, This Grand Total needs to be the total values summed on the top-level rows ONLY and not their children. I am having to write custom code to do this.

1 comment
ADMIN
Tsvetomir
Posted on: 06 Apr 2020 07:57

Hi Martin,

Thank you for taking the time to share your feedback. I can confirm that adding the child items and access to all aggregates from all fields to the arguments of the footer template is possible. 

However, providing the logic for hiding the footer template for certain rows is not a plausible approach. It would require a change in the rendering that should be based on a hard-coded value. I would recommend using the following approach to hide all of the footer rows except for the top one:

    <style>
      tr.k-footer-template:not([data-parentid='null']):not([data-parentid='']){
        display:none;
      }
    </style>

 

Regards,
Tsvetomir
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.