Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
900
Databound Tree Bug
posted
there is a bug in UltraWinTree.TreeNodesCollection.InitializeBindingManager().
It works only in the RootNodesCollection of a tree, not in the sub levels of a recursive DataBinding. (I'm using NetAdvantages 12.2)
 
Take following data class:
 
public class TaskItem
{
   public string Name { get; set; }
   public List<TaskItem> Subs { get; set; }
}
 
Set ShowExpansionIndicator to Allways in the tree.
Bind the tree to following data struct of TaskItems:
 
Root1
Root2
   Sub1
   Sub2
Root3
 
Run the application.
Make a breakpoint in UltraWinTree.TreeNodesCollection.VerifyBoundNodes().
Expand Root2.
 
internal void VerifyBoundNodes()
      ...         
      this.InitializeDataList();
      if ( null == this.dataSource )
      {
         this.InitializeBindingManager();
      }
      this.PopulateBoundNodes();
}
 
InitializeDataList() gets the SubNodesCollection of Root2, it is correct.
InitializeBindingManager() sets the DataBinding to datasource=RootNodesCollection, datamember=”Subs”. It is false.
PopulateBoundNodes() ignores DataBinding and shows the SubNodesCollection, that is why users do not see the Bug.
Parents Reply Children
No Data