By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,027 Members | 865 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,027 IT Pros & Developers. It's quick & easy.

Detect if User Clicks Parent or Child Node?

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"B-Dog" <bd***@hotmail.com> schrieb
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
Nov 21 '05 #2

P: n/a
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?

"Armin Zingler" <az*******@freenet.de> wrote in message
news:#z*************@TK2MSFTNGP14.phx.gbl...
"B-Dog" <bd***@hotmail.com> schrieb
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

Nov 21 '05 #3

P: n/a
"B-Dog" <bd***@hotmail.com> schrieb
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.


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
Nov 21 '05 #4

P: n/a
Thanks will look at that...

"Armin Zingler" <az*******@freenet.de> wrote in message
news:eL**************@TK2MSFTNGP09.phx.gbl...
"B-Dog" <bd***@hotmail.com> schrieb
> 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.


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

Nov 21 '05 #5

P: n/a
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

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.