Detect if User Clicks Parent or Child Node?

B

B-Dog

I want to be able to detect if a user has selected a parent or child node in
a treeview and depending on which is clicked act accordingly based on the
tag. I can get the values but don't know if they are child or parent
values. Thanks
 
A

Armin Zingler

B-Dog said:
I want to be able to detect if a user has selected a parent or child
node in a treeview and depending on which is clicked act accordingly
based on the tag. I can get the values but don't know if they are
child or parent values. Thanks

Each child can also be a parent. Each parent can also be a child.


Armin
 
B

B-Dog

I guess if you have three nodes, but with two there should only be parent
and child right? Well maybe I'm going about it wrong. I want to see if
they click the username(do something) or if they click the child node below
it (do something) Any suggestions?
 
A

Armin Zingler

B-Dog said:
I guess if you have three nodes, but with two there should only be
parent and child right? Well maybe I'm going about it wrong. I
want to see if they click the username(do something) or if they
click the child node below it (do something) Any suggestions?


I didn't know there is only a total of two nodes.

Each node has a parent property. If it is Nothing, the node is the parent.


Armin
 
B

B-Dog

Thanks will look at that...

Armin Zingler said:
I didn't know there is only a total of two nodes.

Each node has a parent property. If it is Nothing, the node is the parent.


Armin
 
J

johnb41

Or try this. On the parent node, set Tag="parent". On the child
node(s), set Tag="child". (name the tags anything you want). Now for
each tag, you check what Tag is equal to and you will know whether it
is a parent or a child. I think this should work...

John
 

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

Top