Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
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 8-Jan-13 22:44pm
Comments
Sandeep Mewara at 9-Jan-13 4:04am
   
You should have shared your related code snippet that is troubling you.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 7,645
1 DamithSL 5,614
2 Sergey Alexandrovich Kryukov 5,344
3 Maciej Los 4,961
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web01 | 2.8.141223.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100