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
340
Hierarchical databinding against ultrawintree
posted

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?

Parents
No Data
Reply
  • 469350
    Offline posted

    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.

Children
No Data