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
210
Is it poosible to add Child and Parent node with same name?
posted

 Hi,

I want to add Child and Parent node in the same name(e.g Node1). It is giving exception as key already exist.

UltraTreeNode parentNode= new  UltraTreeNode("Node1");

 UltraTreeNode childNode= new  UltraTreeNode("Node1");

 parentNode.Nodes.Add( childNode);

Only name(key) is same as Parent and Child node, and it throws exception. 

Could you please let me know to add Child node with same name.

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Node keys have to be unique across the entire tree.So you can't have two nodes with the same key, even if those nodes are on different levels.

    There is no such restriction on the Text property of the node, though. So you can have the same text on as many nodes as you want. 

     

Children