I have a bindinglist containing three columns nodeId, NodeName and parentNodeId
When I set the datasource to that bindinglist how do I get the ultrawintree to handle the hierarchy so that each node is connected to the correct parent?
Hi,
The tree binds to the structure you give it. If you give the tree a flat BindingList, then it will only show a flat list.
If you want to create a hierarchy, you have to give the tree a hierarchical data source, or else manually populate the tree without data binding.
So one way to do this would be to use a DataSet instead of a BindingList. The DataSet support hierarchical data via Relationships.
Another option would be for the items in your BindingList to have a property that returns the child BindingList<T> that contains the child items.
Hello,
The DotNet BindingManager determines the data structure of the UltraWinTree. Like the UltraWinGrid the Tree queries the Binding Manager for each level of entities in order to create its schema based on the underlying object model. If the Binding Manager does not recognize the custom collection and child members, then the Tree cannot either.
For more details I recommend visiting our online documentation:
1. IList and IBindingList
2. Binding WinTree to a Hierarchical Data Source
If the Tree is only displaying one root node level then there may be missing relations with your parent and child tables. If you could please send us a sample then we can look into this further.
Let me know if you have any questions regarding this matter.