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
2730
UltraTreeNode
posted

Can someone send me a small example with 3 parents levels that has 3 child to each parent. First time using a treeview. I want to build the tree dynamically in code. This is would be helpful.

 

parent A

      child A.1

      child A.2

      child. A.3

parent B

      child B.1

      child B.2

      child. B.3

parent B

      child C.1

      child C.2

      child. C.3

Parents
No Data
Reply
  • 2730
    posted

           foreach( var gRow in Group)
            {
                if (!ultraTree1.Nodes.Contains(gRow.PARENT))
                {
                    UltraTreeNode GetUltraTreeNode = new UltraTreeNode(bLine.gRow.ToString(), bLine.INDENT.ToString());
                    if (!this.ultraTree1.Nodes.Contains(GetUltraTreeNode.Key))
                    {
                        this.ultraTree1.Nodes.Add(GetUltraTreeNode); //I keep getting key already exist. I am not understanding why if I have logic thats said not exist
                    }
                }
            }

Children