views:

254

answers:

1

Hi,
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..

A: 

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.

Henk Holterman
yes i want to use Windows forms. Treenode w/o using Treeview. Can Tag property add the xml node to treenode?Thanks
crazy_itgal