I know that the treeview control has a find node by value function, but I only want to look at the parent nodes. I need to see if the value of the new node exists as a parent of the node so that I don't create a loop.
I am using a treeview to display an emergency contact list hierarchy. "Callers" in the tree root call a list of individuals. Some of those individuals have call lists that they are supposed to call and so on down the hierarchy. The treeview has two types of nodes; groups and individuals. A person can be assigned to call a group and / or individuals. The problem is that the person calling is generally a member of the group that they are calling. This creates a loop the callers node expands to display the group, the group expands to display the individuals in the group, the caller is in the group so they expand to show the group again.
I want to compare the callerid stored with the caller node and compare it to all of its parents to see if it has already appeared in the tree so I can stop the loop.
I am using a treeview to display an emergency contact list hierarchy. "Callers" in the tree root call a list of individuals. Some of those individuals have call lists that they are supposed to call and so on down the hierarchy. The treeview has two types of nodes; groups and individuals. A person can be assigned to call a group and / or individuals. The problem is that the person calling is generally a member of the group that they are calling. This creates a loop the callers node expands to display the group, the group expands to display the individuals in the group, the caller is in the group so they expand to show the group again.
I want to compare the callerid stored with the caller node and compare it to all of its parents to see if it has already appeared in the tree so I can stop the loop.