How to expand the node?

  • Thread starter Thread starter Alan T
  • Start date Start date
A

Alan T

Is it possible or is there a method for a treeview to expand down to the
node by giving the node?

Eg.
I was given a node say at level 3 and would like to expand at that node.
 
I am not sure if there is a specific function for doing that, but you
could use recursion to iterate through each collection until it found
the node, and then as each recursive step exits, expand the holding
node.
 
You need to count upwards from the Node to the top of the TreeView, and then
work your way back down. This can be done by checking the Parent property
for each Node. When the Parent returns null, you're at the top.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

What You Seek Is What You Get.
 
Just set given node Property Selected to true, the treeview will expand

/Lennart
 

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

Back
Top