New to Telerik UI for ASP.NET Core? Download free 30-day trial


The TreeList enables you to display aggregated number results when the user groups its data.

To enable the aggregate functions, use the DataSource.Aggregates() and the FooterTemplate() methods of the TreeList, and the aggregate fields of its data source.

        .Columns(columns =>
            columns.Add().Field(e => e.Extension).Title("Ext")
            .FooterTemplate("Tota: #= count #, Sum: #= sum #, Min: #= min #, Max: #= max #, Average: #= average #");
        .DataSource(dataSource => dataSource
            .Read(read => read.Action("All", "EmployeeDirectory"))
            .Aggregates(aggr =>
                aggr.Add(e => e.Extension).Count().Sum().Max().Min().Average();
            .Model(m =>
                m.Id(f => f.EmployeeId);
                m.ParentId(f => f.ReportsTo);
                m.Field(f => f.ReportsTo);
    <kendo-treelist name="treelist">
            <treelist-column field="Extension" title="Ext" 
            footer-template="Tota: #= count #, Sum: #= sum #, Min: #= min #, Max: #= max #, Average: #= average #"></treelist-column>
        <treelist-datasource server-operation="false">
                <read url="@Url.Action("All","EmployeeDirectory")"/>
                <aggregate field="Extension" aggregate="count"/>
                <aggregate field="Extension" aggregate="sum"/>
                <aggregate field="Extension" aggregate="min"/>
                <aggregate field="Extension" aggregate="max"/>
                <aggregate field="Extension" aggregate="average"/>
            <schema data="Data" total="Total" errors="Errors">
                <treelist-model id="EmployeeId" parent-id="ReportsTo">
                        <field name="EmployeeId" type="number"></field>
                        <field name="ReportsTo" nullable="true"></field>
                        <field name="Extension" type="number"></field>

For a runnable example, refer to the demo on using aggregate functions in the TreeList.

See Also

In this article