Treeview : Adding a node to a specific existing node with Net 1.0(work with 2.0)

M

michelqa

Hi,

I'm trying to add nodes to a specific node of a treeview.

With VS 2005 and more (>= .net 2.0) I can set the Nodes.Name property
and then use Nodes.Find("MyNodeName",true) to add nodes to a
particular node of my treeview.

ex :

TreeNode[] nodes =
MyNode.Nodes.Find(GetParent(WindowChildHandle).ToString(), true);
if (nodes.GetLength(0) != 0)
{
nodes[0].Nodes.Add(WindowChildHandle.ToString(),
ChildWindowClassName + " [" + WindowChildHandle.ToString() +
"]");
}
else
{
//FAIL
}

My problem is that my application need to be compiled in VS 2002 (net
1.0) and for some reasons there is no Node.Name and Nodes.Find. Why?
any alternative? Is there something missing to be able to use te
Nodes.Find ??

Thanks
 
M

michelqa

Still need help on this... :(

Just need to know how to add items to a treeview node by specifying
the NAME or TAG or TEXT. This node can be anywere in the treeview
and is unique.

Is anyone know why there is no Node.Name and Nodes.Find when compiling
my application in VS 2002 (work with VS 2005)

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top