Aggregated footer with LoadOnDemand not working

2 posts, 0 answers
  1. Jiri
    Jiri avatar
    3 posts
    Member since:
    Sep 2010

    Posted 21 Nov 2013 Link to this post

    Hi folks.

    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">
                   <telerik:TreeListBoundColumn DataField="ProductCatL3" UniqueName="ProductCatL3" HeaderText="Produkt L3">
                   <telerik:TreeListBoundColumn DataField="ProductCatL2" UniqueName="ProductCatL2" HeaderText="Produkt L2">
                   <telerik:TreeListBoundColumn DataField="ProductCatL1" UniqueName="ProductCatL1" HeaderText="Produkt L1">
                   <telerik:TreeListBoundColumn DataField="State" UniqueName="State" HeaderText="Stav" DataType="System.Decimal" DataFormatString="{0:C2}" Aggregate="Sum">
                   <telerik:TreeListBoundColumn DataField="Avg1Month" UniqueName="Avg1Month" HeaderText="Průměr 1 měsíc" DataFormatString="{0:C2}" Aggregate="Avg">
                   <telerik:TreeListBoundColumn DataField="Avg3Months" UniqueName="Avg3Months" HeaderText="Průměr 3 měsíce" DataFormatString="{0:C2}" Aggregate="Avg">
                   <telerik:TreeListBoundColumn DataField="ApprovedLimit" UniqueName="ApprovedLimit" HeaderText="Schválený limit" DataFormatString="{0:C2}" Aggregate="Sum">
                   <telerik:TreeListBoundColumn DataField="CssClass" UniqueName="Css" HeaderText="CSS" Visible="false">
                   <telerik:TreeListBoundColumn DataField="ParentId" UniqueName="ParentId" HeaderText="ParentId" Visible="false">

    What am I doing wrong that no footer are calculated and it only shows empty fields?

  2. Kostadin
    Kostadin avatar
    1733 posts

    Posted 26 Nov 2013 Link to this post

    Hi Scarlaxx,

    I am afraid that the built-in aggregates doesn't work with Load On Demand data binding. The reason is that the child nodes are added on the fly as parent nodes are expanded and aggregates could not be calculated initially. You have to use another data binding type in order to display the aggregates.

    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.
Back to Top