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
804
Adding Programmatically Nodes In ultrawebtree
posted

Hi,

I want to had some Nodes in webTreeView DYNAMICLY and I want to be able to redraw the parent node for place my new nodes at the good position. AND how can I do to add multi level nodes?

thx

Gabriel

Parents
  • 995
    posted

    Hi,

    If the meaning of the good position is a specific position in an UltraWebTree, you can create a parent and child nodes insert dynamically at specific position using indexes :

      Node n = new Node();   // create a parent node

      n.Text = "New Node";

      n.Nodes.Add(new Node("One", null));   // adding some child nodes

      n.Nodes.Add(new Node("Two", null));

      n.Nodes.Add(new Node("Three", null));

      this.UltraWebTree1.Nodes[1].Nodes.Insert(2, n);

    //this line inserts parent node with its children to child nodes collection of the second node in a tree.

Reply Children