You will need to implement a simple recursive routine:
TreeViewWalk(treeView.Nodes);
private void TreeViewWalk(TreeNodeCollection nodes)
{
foreach (TreeNode node in nodes)
{
// do what you want to do with 'node' here.
if (node.ChildNodes.Count > 0)
{
TreeViewWalk(node.ChildNodes, list);
}
}
}
--
Andrew Robinson
blog.binaryocean.com
www.binaryocean.com
"AlexDP" <Al****@discussions.microsoft.com> wrote in message
news:84**********************************@microsof t.com...
Hi
I'm trying to do a text search on a TreeView control. So far I've been
able
to find the matching items and add them to another treeView but I want to
be
able to add its whole path to the other treeView and not just the matching
node.
Any ideas on how to do this?