Last Updated: 06 Apr 2018 12:55 by ADMIN
The agregate sum value shown in the bottom of the TreeList columns displays bigger sum than the actual one (it seems that the child items values are also taken into consideration).

Steps to reproduce:
1. Open

2. Check the sum shown in the Population column

Actual: It shows 10,702,470,081.00

Expected: It should be 6,464,732,588.00
Last Updated: 21 Jan 2015 09:46 by ADMIN
This error occurs using version 2013.2.717.45 of Telerik.Web.UI.dll

We are using a RadTreeList to display data with a three-part key.  The control was set up with AllowLoadOnDemand="true", DataKeyNames="Key1,Key2,Key3", and ParentDataKeyNames="ParentKey1,ParentKey2,ParentKey3", and both the NeedDataSource and ChildItemsDataBind events were handled properly on the server side.  Clicking the expand/collapse buttons resulted in erratic behavior -- sometimes, all nodes on a given level would be expanded or collapsed at once, sometimes, the entire tree would collapse and not be able to be expanded again, and occasionally the desired node would expand or collapse as desired.

I tracked the problem (using JustDecompile) to a bug in TreeListLoadOnDemandContext.ItemNeedsToBeExpanded.  The same bug appears to be in ItemNeedsToBeSelected, RemoveExpandedDataKeyValue, and RemoveSelectedDataKeyValue as well.  In all four cases, the code loops through the data keys comparing one to the next -- but overwrites its flag on each iteration.  In other words, it doesn't check if ALL keys are equal, only if the last one compared is equal.

I added "Key" and "ParentKey" fields to the data object that combined all three fields into a single struct, so that the control now has DataKeyNames="Key" and ParentDataKeyNames="Parent", and it now works properly.