473,394 Members | 1,693 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,394 software developers and data experts.

vb.net form and treeview

What is the most effecient method to take data from a
database table (sqlserver) to a vb.net treeview control.

The database table looks like
ID, Name, ParenetID
1 , test, <null>
2, test2, 1
3, test3, 2

The above would create a tree with 3 levels?

Suggestions?
thx
(code samples would be great)
Jul 21 '05 #1
1 1809
Hello,

Thanks for your post. I suggest that yuu can retrieve the data from SQL
Server to a DataSet and then fill the TreeView. Please refer to the
following samples:

ADO.NET: Populate a DataSet from a Database
http://samples.gotdotnet.com/quickst...ataFromDB.aspx

Populate a TreeView from a SELF-JOINED table
http://www.codeproject.com/cs/database/2dtreeview.asp

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #2

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

Similar topics

4
by: John Bailo | last post by:
I am trying to debug a form in VS.NET 2003 I set some breakpoints for a treeview click event. This is what happens: The form loads. I click a node in treeview The break point is hit
1
by: Frank Uray | last post by:
Hi al I am trying the following On a base form I open a new form with a treeview On the base form, there are two buttons Depending on the selection in the treeview on the new form, I like to...
1
by: Terry | last post by:
I've seen several posts from people who have seen this flashing in TreeView's when resizing a form. I've noticed it in my app, but only in the child windows. For example, my main form has a...
14
by: Fr15ky | last post by:
First of all, I am using the .NET 2.0 framework with Visual Studio 2005. I have two forms. One is a form with a TreeView control on it (used as a menu - kindof a favorites list) and the other is...
2
by: dixiecanterbury | last post by:
I have a tree view on a form and I need to pass that treeview to another form keeping the state of the treeview (expanded nodes, etc). After the treeview has been manipulated (added nodes,...
5
by: david | last post by:
I do not know if there is a treeView control for web form in .NET 1.1. I know there is IE Webcontrol package which has the treeview control for ..net 1.0. I have tested it in .net 1.1 before. It...
1
by: ShadowFil | last post by:
Hello, In a MDI application, I want a child form which contains a treeview with a associated form for each node. If I create a child form, I only can put controls. So I can puta Treeview...
5
by: marfi95 | last post by:
I have a form that has a left and right panel. In the left panel is a treeview. The right panel I want to change dynamically based on the type of node selected. What I'm doing is loading the...
3
by: WISara | last post by:
Hi all - I'm kind of a newbie. I've been researching this problem for a couple of days now and my searches haven't really come up with any solutions - hopefully I'm just doing something silly and...
0
by: Dennis Francek | last post by:
Hello I have populated a treeview from my dataset and by clicking in the treeview i want to get the corresponding table shown in a datagridview. Ive managed this by looking at each DataRow and...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.