Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I have a treeview in winwoforms. It has one root and four child nodes.
Using mouseclick event, I need to take index of the selected node but the problem with me is, it displays the index of root node only, even if I click root node or any of the child node, it display index as 0

I want to identify if user clicked the root node or child node.

Please advise.
Thanks
Posted
Comments
Sandeep Mewara 9-Jan-13 4:04am    
You should have shared your related code snippet that is troubling you.

1 solution

As far as I know, the TreeView class has no selected index property.
If you need the SelectedNode reference, you may handle the AfterSelect event.
 
Share this answer
 

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