?
Solved

Treeview Select Node ?

Posted on 2006-05-16
3
Medium Priority
?
479 Views
Last Modified: 2012-08-13
In code how can I select a specific Node in a Treeview? I now the exact row it is on.
0
Comment
Question by:szx248
  • 2
3 Comments
 
LVL 3

Expert Comment

by:wildcard76
ID: 16696256
Hi,


myTree.Nodes(0)
should give you the first node of the tree, on the upmost level.

This should work fine if you are trying to reach some node on the upmost level.

If you have nested nodes, you can also reach themby extending the notation like,

myTree.Nodes(0).nodes(4).nodes(2)

this will give you the 3rd node of the 5th node of the first node on the root :)

hope this helps

Regards

0
 

Author Comment

by:szx248
ID: 16696392
I am not asking how to reference it, but how to SELECT it, meaning that it should be equivlant to when you click with the mouse a that Node
0
 
LVL 3

Accepted Solution

by:
wildcard76 earned 200 total points
ID: 16696419
oh sorry...

then the code should look like

myTree.SelectedNode=myTree.Nodes(0).nodes(4).nodes(2)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question