This is a migrated thread and some comments may be shown as answers.

Find parent node by value

1 Answer 50 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Joe Terhune
Top achievements
Rank 2
Joe Terhune asked on 08 Jul 2010, 06:13 PM
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.

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 13 Jul 2010, 12:39 PM
Hello Joe Terhune,

Could you, please, be a bit more specific about the scenario that you try to achieve?


Regards,
Nikolay Tsenkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
Joe Terhune
Top achievements
Rank 2
Answers by
Nikolay Tsenkov
Telerik team
Share this question
or