473,396 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Detect if User Clicks Parent or Child Node?

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
5 3987
"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
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
"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Nutshell | last post by:
Hi, I would like to add an attribute to the child node if it is the only child node. The problem is I am not getting the correct count of child nodes with this template: <?xml version="1.0"?>...
9
by: jon wayne | last post by:
OK! I had this nagging doubt Consider (without worrying abt access specifiers) class Kid : public Parent{...}; Parent::someFunc() { Kid k; }
2
by: dannielum | last post by:
Hi all, I am trying to write a Binary Search Tree that each of its node will have 3 node pointers: left, right and parent. I need a parent pointer for some the purpose of my project. Without the...
1
by: clintonG | last post by:
How do I get a TreeNode.Parent property when using the 2.0 TreeView control? When the data source is an XML file there may be redundant names in the tree. For example, when a child node with the...
4
by: patrizio.trinchini | last post by:
Hi all, I'm new to XSLT and maybe my problem have a very trivial answer, but I need an expert that point me in the right direction. What I would obtain is to remove all the elements that have a...
3
by: Irocivan | last post by:
Hello, I download a nice collapse menu for free distribution from the internet. It works very well except that none of the parents nodes are clickable (i.e. when clicking on the parent node, the...
6
by: Proogeren | last post by:
I was wondering if there is a way to detect if the user clicks on a node in a treeview. I know of the onnodeclickchange event but this will not fire if you click on the same node twice (only fire the...
6
by: SQACSharp | last post by:
I'm using the EnumChildWindows API with an EnumChildWndProc callback to populate the treeview. The output will be something similar to spy+ + How can I specify the parent when adding a new node...
0
by: Guzeppi | last post by:
Hi, i'm using linq to load an xml structure into my classes. the xml consists of the same node nested for multiple levels e.g. <node id="node_id01" name="node 01"> <node id="node_id0101"...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.