Treenode unique ID

  • Thread starter Thread starter Mark Goldin
  • Start date Start date
M

Mark Goldin

In a web version of treeview control every node has a unique ID based on a
position of that node in the tree.
Is there something like this in a winform version of the control?

Thanks
 
* "Mark Goldin said:
In a web version of treeview control every node has a unique ID based on a
position of that node in the tree.
Is there something like this in a winform version of the control?

No. Even 'FullPath' sometimes isn't unique. Nevertheless you can store
an ID in the 'TreeNode''s 'Tag' property and/or store (key, 'TreeNode')
pairs in a 'Hastable'.
 
Mark Goldin said:
In a web version of treeview control every node has a unique ID based on a
position of that node in the tree.
Is there something like this in a winform version of the control?

I think there is a "FullPath" property, which should be unique to each tree
node (unless you have duplicate node text udner a single node?).

I used this in my TreeViewMemory class
(http://www.tobinharris.com/default.asp?id=11&mnu=11) which is designed to
allow you to save and restore the state of a tree in between clearing and
reloading it.

Cheers,

Tobin
 
Back
Top