473,756 Members | 5,160 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TreeView in Visual Basic.Net 2008

CAM
Hello,

I created a Treeview which has several roots with child nodes. What I am
trying to do is go to a form when the user press the third root and the
first child. How do I code that? Any tips will be appreciated. Thank you
in advance.

Cheers

Oct 14 '08 #1
2 5701
On Oct 14, 7:55*am, "CAM" <alex_marti...@ ca.rr.comwrote:
Hello,

I created a Treeview which has several roots with child nodes. *What I am
trying to do is go to a form when the user press the third root and the
first child. *How do I code that? *Any tips will be appreciated. *Thank you
in advance.

Cheers
Assuming your child node is located under a root node, you can
directly determine when child node is selected in TreeView's
AfterSelect event:

Private Sub TreeView1_After Select(ByVal sender As System.Object, _
ByVal e As System.Windows. Forms.TreeViewE ventArgs) _
Handles TreeView1.After Select
If e.Node.Name = "child_node_nam e" Then
<form_name>.Sho w()
End If
End Sub

HTH,

Onur Güzel
Oct 14 '08 #2
CAM
Thank you Kimiraikkonen, I was able to code and works great according to
your tip. Again, I appreicate the help.

Cheers

"kimiraikko nen" <ki************ *@gmail.comwrot e in message
news:b8******** *************** ***********@q35 g2000hsg.google groups.com...
On Oct 14, 7:55 am, "CAM" <alex_marti...@ ca.rr.comwrote:
Hello,

I created a Treeview which has several roots with child nodes. What I am
trying to do is go to a form when the user press the third root and the
first child. How do I code that? Any tips will be appreciated. Thank you
in advance.

Cheers
Assuming your child node is located under a root node, you can
directly determine when child node is selected in TreeView's
AfterSelect event:

Private Sub TreeView1_After Select(ByVal sender As System.Object, _
ByVal e As System.Windows. Forms.TreeViewE ventArgs) _
Handles TreeView1.After Select
If e.Node.Name = "child_node_nam e" Then
<form_name>.Sho w()
End If
End Sub

HTH,

Onur Güzel

Oct 14 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
345
by: Dudi Nissan | last post by:
Hi, My is: <%@ Register TagPrefix="IE" Namespace="Microsoft.Web.UI.WebControls" Assembly ="Microsoft.Web.UI.WebControls" %> <%@ Import Namespace="Microsoft.Web.UI.WebControls" %> <HTML> <HEAD> <title>TreeView</title>
1
9654
by: Access User | last post by:
I'm looking for complete documentation for the activex component "TreeView" in Access. I need a complete list of methods and properties, if such a thing exists. Paul
1
5886
by: http://www.visual-basic-data-mining.net/forum | last post by:
Hello, I am working on Treeview control. I want that, user create tree according to his requirement, can add topic under any node. Then just click update and that treeview data to be stored in MSAccess database. I already created how can he build tree but now unable to store tree data into dataset. So can somebody tell me how to store treeview data into dataset. Thank You in Advance.
5
5712
by: JamesT | last post by:
Is it me or has the VB.NET Treeview control gone back to the darkages. I am trying to update a VB6 programme that uses the treeview control a lot- there are 4 treeview controls which are constantly being altered by user input. On upgrading the treeview errors are too numerous to list all of them. What has happened to 'Treeview1.nodes.add (ParentNode, Relation, NodeKey, Text)'? and Treeview1.nodes(NodeKey) Why is there no Node.Key? ...
77
14437
by: Tark Siala | last post by:
hi i working with TreeView in VB6, and have good Properity Named (Key) with the Key i can goto Any Node i know hes Key. but in VB.NET i can find the Key :( please tell me where i can find the key in TreeView.Net... ----------------------------------------------- Best Regards From Tark
3
9844
by: SteveT | last post by:
I am trying to populate a TreeView with XML data within a DataSet. I don't see the property DataSource in the treeview, only a DataBinding. Can that property to be used to populate my TreeView or must I brute force my way by added each row of my dataset to the TreeView? -- ----------- Thanks, Steve
3
2132
by: Saucer Man | last post by:
Is this only available as part of Visual Studio or can it be purchased separately? -- Thanks!
3
11041
by: =?Utf-8?B?TWFyaw==?= | last post by:
In Visual Basic 2008 how do I programmatically set a node to selected? For example, my treeview has several nodes with dates, and I want set one of the dates as selected because it happens to match a date variable. How would I go about this? Thanks for any help! Mark
0
2207
by: dutsnekcirf | last post by:
Okay, I think this one is a really hard one for yous geniuses out there. I'm going to try my best to explain in as much detail as I can. And for the most part I just want to know if I'm doing this the right way of it there's an easier way to do it. Background/Platform: Windows XP Office Excel 2007 Visual Studio Tools for Office 2008 Document level customization VB.Net I have a spreadsheet that is used to project which site(s) a...
0
9431
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9255
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9844
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9819
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6514
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5119
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5289
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3780
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2647
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.