This is a migrated thread and some comments may be shown as answers.

Aggregated footer with LoadOnDemand not working

1 Answer 21 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Jiri
Top achievements
Rank 1
Jiri asked on 25 Nov 2013, 09:18 AM
I have a treelist control on my page where I load the items dynamicaly. At each section I'd like to have aggregated sums at the bottom. I thing I have all set correctly regarding online demos but the result footer are all empty.

I use this code:

<
telerik:RadTreeList ID="rtlData" AllowLoadOnDemand="true" runat="server" AutoGenerateColumns="false"
    OnChildItemsDataBind="RadTreeList_ChildItemsDataBind" OnNeedDataSource="RadTreeList_NeedDataSource"
     DataKeyNames="CssClass,ParentId" ParentDataKeyNames="CssClass,ParentId" OnItemCreated="RadTreeList_ItemCreated"
    OnItemDataBound="RadTreeList_ItemDataBound" ShowFooter="true">
     <Columns>
          <telerik:TreeListBoundColumn DataField="ProductCatL3" UniqueName="ProductCatL3" HeaderText="Produkt L3">
          </telerik:TreeListBoundColumn>
          <telerik:TreeListBoundColumn DataField="ProductCatL2" UniqueName="ProductCatL2" HeaderText="Produkt L2">
          </telerik:TreeListBoundColumn>
          <telerik:TreeListBoundColumn DataField="ProductCatL1" UniqueName="ProductCatL1" HeaderText="Produkt L1">
          </telerik:TreeListBoundColumn>
          <telerik:TreeListBoundColumn DataField="State" UniqueName="State" HeaderText="Stav" DataType="System.Decimal" DataFormatString="{0:C2}" Aggregate="Sum">
          </telerik:TreeListBoundColumn>
          <telerik:TreeListBoundColumn DataField="Avg1Month" UniqueName="Avg1Month" HeaderText="Průměr 1 měsíc" DataFormatString="{0:C2}" Aggregate="Avg">
          </telerik:TreeListBoundColumn>
          <telerik:TreeListBoundColumn DataField="Avg3Months" UniqueName="Avg3Months" HeaderText="Průměr 3 měsíce" DataFormatString="{0:C2}" Aggregate="Avg">
          </telerik:TreeListBoundColumn>
          <telerik:TreeListBoundColumn DataField="ApprovedLimit" UniqueName="ApprovedLimit" HeaderText="Schválený limit" DataFormatString="{0:C2}" Aggregate="Sum">
          </telerik:TreeListBoundColumn>
          <telerik:TreeListBoundColumn DataField="CssClass" UniqueName="Css" HeaderText="CSS" Visible="false">
          </telerik:TreeListBoundColumn>
          <telerik:TreeListBoundColumn DataField="ParentId" UniqueName="ParentId" HeaderText="ParentId" Visible="false">
          </telerik:TreeListBoundColumn>
     </Columns>
</telerik:RadTreeList>

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 28 Nov 2013, 09:53 AM
Hello,

These two features: aggregates and load on demand are not compatible with each other because in order to properly calculate the aggregates all the child items have to be loaded accordingly and in the case of load on demand these are loaded only when a parent item is expanded. That's why the aggregates cannot to be calculated in advance in case of load on demand because it is not clear whether any items have additional child items before they are expanded and loaded.

Kind Regards,
Marin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
TreeList
Asked by
Jiri
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or