473,385 Members | 1,782 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Help with Treeview

I am new to VB and need some help with treeview.

I am looking for something like windows explorer where you can have an infinite number of folders under any folder. I plan to use this tree to show a connectino path.

With the database, I can record which parent a device goes to, but for the treeview, it seems I need to know the child. I can create a table that crossreferences these items, but they can be changed at any time.

Can someone point me in the right direction?

Thanks
Feb 12 '07 #1
2 972
Killer42
8,435 Expert 8TB
...I can record which parent a device goes to, but for the treeview, it seems I need to know the child.
I don't think that's correct. When you create a node, you specify the parent of the new node. When accessing nodes, you have properties which return parent, children or siblings.
Feb 13 '07 #2
[hi this is nasir sending u a solution fron tree view

Set rs_gl = db.OpenRecordset("SELECT gl_code, gora,gora & ' - ' & gl_code & ' - ' & gl_name AS " _
& " acc FROM glmas ORDER BY gl_code")

Set rs_link = db.OpenRecordset("select * from table name")

Do While Not rs_gl.EOF
rs_link.FindFirst "ac_code=" & rs_gl!gl_code
If rs_link.NoMatch = False Then
Set Node1 = TreeView1.Nodes.Add(, , "Code" & rs_gl!gl_code, rs_gl!acc, "chkon")
Else
Set Node1 = TreeView1.Nodes.Add(, , "Code" & rs_gl!gl_code, rs_gl!acc, "chkoff")
End If

rs_gl.MoveNext
Loop
Feb 16 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: fgh | last post by:
Hello, two questions please: 1) In a treeview, I want to display folders like it is done in Windows Explorer. Do I have to do this manually or can I set something up in VS.NET 2003? 2) Most...
3
by: serge calderara | last post by:
Dear all, I ma collected data from a CSV file and build dataset based on those data. I would like to bind this dataset to a treeview control in order that nodes gets displayed automatically...
3
by: serge calderara | last post by:
Dear all, I have a csv file data which has been read and populate on a dataset object. then I need to bind part of the content of the dataset to a treeview control. I have read that XML format...
12
by: serge calderara | last post by:
Dear all, I have a function that I need to run in a thread due to the fact that it can takes long time to execute according to the amount of data to collect. This function is also populating a...
10
by: Brian | last post by:
I'm reasonably new to C#, and using a class containing a hashtable collection to feed a treeview. My problem is that I can't pull the data from the hashtable! Here's the code I have: if...
1
by: needin4mation | last post by:
Hi, I am using C# in asp.net. I have my treeview control from my built ..dll on my toolbox. I can drop it on the webpage. What I cannot do is reference treeview objects from the codebehind form....
1
by: Macca | last post by:
Im am writing an application that will looks similar to Outlook or a help file, i.e tree structure on left with right hand side pane showing data. It is split into two panes.The Left pane has a...
0
by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView id="TreeView1" Height="520"...
2
by: DJG | last post by:
I need some help with a TreeView control in VB.Net I've got a datatable with about 8000 rows. 500 are 'folders', and the other 7500 rows are 'jobs'. It's a logical representation of some data,...
3
by: William Sullivan | last post by:
I desperately want to replace my hand-made ajax treeview with the 2.0 TreeView. The webpage I'm designing uses the postbacks to dynamically fill the treeview. The reason why I'm doing this is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.