Aggregated footer with LoadOnDemand not working

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

    Posted 25 Nov 2013 Link to this post

    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>
  2. Marin
    Admin
    Marin avatar
    1044 posts

    Posted 28 Nov 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top