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
430
Add New Root Node to the bound nodes collection
posted

Hi,

I have slightly different issue. In my Ultra Tree i am having this Bounded Collection of Nodes fatched using the Dataset from the database.

i am able to add child node in the bounded Collection of nodes but i want to add a new root node in the Ultra Tree.

Requirement in my case to have Two Root Node and both having child Nodes fatched from diff Database respectively means use of two datasource in one ultra tree.

Ex:

Rootnode1 is Table1 and RootNode2 is Table2

RootNode1

     ChileNode1 (Dataset 1)

     ChileNode2 (Dataset 1)

     ChildNode3 (Dataset 1)

RootNode2

     ChildNode4 (dataset 2)

     ChileNode5 (dataset 2)

 

Regards,

Rufus

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Rufus,

    Actually, you can do this. What you would do is add the two root nodes and then call SetDataBinding on the child nodes collection of each:

                UltraTreeNode rootNode1 = this.ultraTree1.Nodes.Add("RootNode1");
                rootNode1.Nodes.SetDataBinding(dataSet1, "DataMember");

                UltraTreeNode rootNode2 = this.ultraTree1.Nodes.Add("RootNode2");
                rootNode2.Nodes.SetDataBinding(dataSet2, "DataMember");

     

Reply Children
No Data