Help with TreeView control

D

Dan Rolfe

Hello all!

I am wondering how to read the KEY value off of a TreeView Node.
I assign the nodes these key values when I add them to the control,
but I cannot figgure out how to recall that information back.

Is this possible even?? Why do they allow you to add a unique key
value if you cant read it back... :-\ What is it that I am missing?
 
J

Jan Hyde (VB MVP)

"Dan Rolfe" <[email protected]>'s wild thoughts were
released on 29 Mar 2007 07:46:30 -0700 bearing the following
fruit:
Hello all!

I am wondering how to read the KEY value off of a TreeView Node.
I assign the nodes these key values when I add them to the control,
but I cannot figgure out how to recall that information back.

Is this possible even?? Why do they allow you to add a unique key
value if you cant read it back... :-\ What is it that I am missing?

IIRC the Name property will return the key.

MessageBox.Show(TreeView1.Nodes(0).Name)
 

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