Like John H says, the
or the [e.node.Tag] or the [e.node.Text] can be used
e.g. I use the e.node.Tag for doing specific actions like loading employee records from a form(or more like a subform) into a panel on my parent form that also has the tree.
If what John H mentioned doesnt help, try rephrasing your question. I'm also working with the tree control now and the e.node is the real trick to most "which node have i clicked and what should happen " problem
Question: Have you set the tag properties for each node in the section of your code for the tree control...
e.g.
Code:
Dim childrow As DataRow
Dim childnode As TreeNode
childnode = New TreeNode()
For Each childrow In parentrow.GetChildRows("DeptToJob")
childnode = parentnode.Nodes.Add(childrow(0) & " " & childrow(1) & " " & childrow(2))
childnode.Tag = childrow("dept_id")
then I can use the
to return a value to a form or a text box or a listbox
e.g. under the
Code:
treeView1_afterSelect
I can use an
Code:
textbox1.text = e.node.tag
something like that..
hope this helps