Footer template only at the root level of TreeList.

1 Answer 457 Views
TreeList
Pankaj
Top achievements
Rank 1
Pankaj asked on 13 Dec 2021, 10:36 AM | edited on 13 Dec 2021, 10:39 AM

Hi,

I need to show some aggregates data at the root level node of tree list i.e at the bottom of the tree list, not at each node if the tree has more then one node. Can anyone suggest a way to hide the footer template except at the root node and show total or aggregates data at the root level node of tree list only . I am attaching screenshot of my requirement.

Thanks

Pankaj Toshniwal

1 Answer, 1 is accepted

Sort by
1
Martin Bechev
Telerik team
answered on 16 Dec 2021, 07:37 AM

Hi Pankaj,

Thank you for the provided screenshot.

The most straightforward approach to achieve the desired behavior is by using custom CSS style:

      tr.k-footer:not(:last-child){
          display: none;
      }

https://stackblitz.com/edit/angular-jgqag6

Indeed there is no dataItem exposed by the kendoTreeListFooterTemplate directive since it isn't added to the calculated aggregates object. That is why we cannot used it as a reference to determine the visibility of the template by some custom conditions.

I hope this helps.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Pankaj
Top achievements
Rank 1
commented on 17 Dec 2021, 10:59 AM

Thanks Martin for the solution
Tags
TreeList
Asked by
Pankaj
Top achievements
Rank 1
Answers by
Martin Bechev
Telerik team
Share this question
or