-1

i already have a project with TreeNode class which creates a hierachy of nodes like treeview. Now i want to add a XML node to that treenode.

In a simple way i can do it by using windows forms Treeview widget, But i don't want to use that.

Is there any other way through which i can add nodes to the treenode?

Thanks..

H H
  • 263,252
  • 30
  • 330
  • 514
crazy_itgal
  • 309
  • 1
  • 9
  • 20

1 Answers1

0

Your question isn't very clear, are you saying you are using a Windows.Forms.TreeNode without a TreeView?

If so, TreeNode has, like al controls, a Tag property that you can use to store any data in. Tag is of type System.Object so you'll have to typecast when reading it back.

Add:

As in this question, also by you. I can't tell the difference. If you have a specific new question here it is not becoming clear.

Community
  • 1
  • 1
H H
  • 263,252
  • 30
  • 330
  • 514
  • yes i want to use Windows forms. Treenode w/o using Treeview. Can Tag property add the xml node to treenode? Thanks – crazy_itgal May 02 '09 at 18:45