Tree view depth?

A

Ayende Rahien

I've a tree view in my application, and on the other side there is a list
view, I want to show on the listview details about the all the exposed nodes
in the tree view, how can this be done?
I need to know the height of every node, I guess, but how can I get it?

Example:
treeview listview
-root the root
--leaf just a leaf
--branch wow, a branch
----leaf just a leaf
----leaf just a leaf
 
H

Herfried K. Wagner [MVP]

* "Ayende Rahien said:
I've a tree view in my application, and on the other side there is a list
view, I want to show on the listview details about the all the exposed nodes
in the tree view, how can this be done?
I need to know the height of every node, I guess, but how can I get it?

Example:
treeview listview
-root the root
--leaf just a leaf
--branch wow, a branch
----leaf just a leaf
----leaf just a leaf

Have a look at the 'TreeNode''s 'FullPath' property. You can split it
on the separator and count the number of items to get the depth.
 

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

Similar Threads


Top