Declined
Last Updated: 25 Feb 2021 13:35 by ADMIN
alon
Created on: 26 Nov 2020 20:47
Category: TreeList
Type: Bug Report
1
kendo ui treelist aggregate template sum issue, the sum for group not include the parent row. the down template ok.

When aggregate sum few child's rows the parent row not calculate only at the bottom of the treelist grid.

First I thought there is a problem in my code, after search I found this post.

I have fixed the data type but as I said the parent not include in the sum group only at the bottom total.

link : https://stackoverflow.com/questions/34848829/kendotreelist-aggregate-not-working-properly.

Thanks

 

5 comments
ADMIN
Eyup
Posted on: 12 Dec 2020 07:43

Hello Alon,

 

I've investigated this case and the behavior of the TreeList is correct: the parent row should not be included in the calculation since it is a separate instance in the logical sense. Albeit visually it seems that all the values are on the same level, in reality the parent item is on a different rank. It is similar to Grid Grouping:
https://demos.telerik.com/kendo-ui/grid/aggregates

And Grid Hierarchy:
https://demos.telerik.com/kendo-ui/grid/hierarchy

For better clarification, you can open the following live sample:
https://demos.telerik.com/kendo-ui/treelist/aggregates

As a Total count in the TreeList, there are 99 employees. But when you expand the CEO Daryl there are 98 people under him and he himself is the last 99th employee. The key word here is "under" so all the aggregates, counting and calculations includes the items "under" this parent level.

I hope the clarification was helpful. Nevertheless, if you insist on implementing this behavior, you can log a Feature Request:
https://feedback.telerik.com/kendo-jquery-ui

Or we can search for a custom javascript solution.

 

Regards,
Eyup
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

ADMIN
Eyup
Posted on: 10 Dec 2020 13:38

Hello Alon,

 

Thank you for the provided code files.

I will try to reproduce the issue using the provided info and get back to you with my findings.

Thank you for your patience in advance.

 

Regards,
Eyup
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

alon
Posted on: 03 Dec 2020 15:42

i see the dojo didn't save my changes, here is my code:

 

var data = [{ id: 1, parentId: null, Name: "aaa Parent", premia: 12 },
          { id: 2, parentId: 1,    Name: "aaa childs1", premia: 10 },
          { id: 3, parentId: 1,    Name: "aaa childs2",  premia: 45 },
          { id: 4, parentId: null, Name: "bbb Parent", premia: 22 },
          { id: 5, parentId: 4,    Name: "bbb Child1", premia: 31 },
          { id: 6, parentId: 4,    Name: "bbb child2",  premia: 40 },
          { id: 7, parentId: null, Name: "ccc Parent", premia: 20 },
          { id: 8, parentId: 7,    Name: "ccc chaild1", premia: 9 },
          { id: 9, parentId: 7,    Name: "ccc Child2",  premia: 33 }];
      
      var columns = [{ field: "Name" }, { field: "premia", type: "number", footerTemplate: "Total: #= sum # " }];
      
    $("#treelist").kendoTreeList({
      dataSource: {
        data: data,
        schema: { model: { fields: {Name: { type: "string" }, premia: { type: "number" } }}},
        aggregate: [{ field: "premia", aggregate: "sum" }]
      },
      columns: columns
    });


Attached Files:
alon
Posted on: 03 Dec 2020 14:03

I did the update in this dojo link, please take a look

the parent rows are not aggregate...

Thanks

 

Alon

ADMIN
Eyup
Posted on: 03 Dec 2020 13:27

Hello Alon,

 

Could you modify the following live sample to resemble your configuration and demonstrate the issue and send it back to us?
https://dojo.telerik.com/ojAvafuh

This will allow us to more precisely determine whether this is a bug and forward it to our Dev team.

 

Regards,
Eyup
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.