Click here to Skip to main content
15,936,466 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi friends,

I have tree view control having two level (parent & Child only) in window application i want to check which type of node is checked whether it parent or node

here parent node may be more then one and each parent node contain also more than child.

if the parent node is checked then i want to get all checked parent node text and if child node checked then want to get all checked child node text in all parent node.

please help me,

Thanks in advance.
Updated 2-May-11 2:57am

1 solution

If I get your question right ... if you wish to know the node is a parent just check the nodes property of a treenode like,

if (nd.Nodes.Count == 0)
            //child node
            //parent node

hope that helps
Share this answer
Parveen Rathi 3-May-11 1:29am    
Sorry sir it show the count of the all Parent node count but the requirement is to check only checked parent node or child and get its test
Samuel Cherinet 3-May-11 9:46am    
Can you post the code you have done so far, coz am having a hard time wrapping my head around what you are looking for.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900