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

Aggregated footer with LoadOnDemand not working

1 Answer 12 Views
TileList
This is a migrated thread and some comments may be shown as answers.
Jiri
Top achievements
Rank 1
Jiri asked on 21 Nov 2013, 12:32 PM
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">
          <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>

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

Sincerely
Scarlaxx

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 26 Nov 2013, 09:41 AM
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.

Regards,
Kostadin
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
TileList
Asked by
Jiri
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or