I"m trying to get a better understanding on what is going on.
First I'm experiencing a Key Already Exists exception when I add a node to a parent node using parentnode.Add(newNode). From what I understand each node has its own TreeNodesCollection which is the Nodes structure. Now if I do:
parentNode.Exists(newNode.Key) I will get false prior to getting this exception using the Add.
However I do know that somewhere else in this tree with a different parent is is a node with the same key. So once a node is added to a tree, is there some kind fo master key structure in the tree that keeps track of all nodes? I figured as long as each parent had its own nodes collection then they just had to have unique children. I also create all of my own keys.
Please enlighten me on what is going on.
Keys are unique to the entire tree control, not a node. You need to use the function on the tree itself to verify whether a key exists or not, rather then the node collections.
Ok that is what I suspected. What is the structure called on the tree? the tree.Nodes will only return its highest level nodes, not all the nested children. Therefore the .Exists will not work on that. There must be a *global* structure somewhere on this tree...