473,327 Members | 2,065 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,327 software developers and data experts.

populate treeview from databas

how can i populate a treeview from a database?
websites with examples would help.
Nov 16 '05 #1
4 8588
Mike,

It all depends on the layout of your tables and the nature of the
relations.

However, regardless of what that layout is, there is no mechanism for
populating a tree view from a data set, or list. You will have to create
the tree view nodes yourself, creating the hierarchies.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com...
how can i populate a treeview from a database?
websites with examples would help.

Nov 16 '05 #2
I'm getting the data from a web service via a dataset in XML format, can i
populate it from the XML dataset?

"Nicholas Paldino [.NET/C# MVP]" wrote:
Mike,

It all depends on the layout of your tables and the nature of the
relations.

However, regardless of what that layout is, there is no mechanism for
populating a tree view from a data set, or list. You will have to create
the tree view nodes yourself, creating the hierarchies.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com...
how can i populate a treeview from a database?
websites with examples would help.


Nov 16 '05 #3
Mike,

Yes, but you have to do it manually. You have to cycle through your
XML, creating TreeViewNode instances and attaching them to the tree.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
I'm getting the data from a web service via a dataset in XML format, can i
populate it from the XML dataset?

"Nicholas Paldino [.NET/C# MVP]" wrote:
Mike,

It all depends on the layout of your tables and the nature of the
relations.

However, regardless of what that layout is, there is no mechanism for
populating a tree view from a data set, or list. You will have to create
the tree view nodes yourself, creating the hierarchies.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com...
> how can i populate a treeview from a database?
> websites with examples would help.


Nov 16 '05 #4
so i can't create the top layer nodes of the tree via code from the XML file
Like i can in VB.NET i have to code the headers manually?

I'm currently looking at some VB.NET code that does this already via code
nothing is hardcoded in the treeview, the entire thing is populated from a
XML dataset. I'm going to try to convert it to C# and see if it works.

"Nicholas Paldino [.NET/C# MVP]" wrote:
Mike,

Yes, but you have to do it manually. You have to cycle through your
XML, creating TreeViewNode instances and attaching them to the tree.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
I'm getting the data from a web service via a dataset in XML format, can i
populate it from the XML dataset?

"Nicholas Paldino [.NET/C# MVP]" wrote:
Mike,

It all depends on the layout of your tables and the nature of the
relations.

However, regardless of what that layout is, there is no mechanism for
populating a tree view from a data set, or list. You will have to create
the tree view nodes yourself, creating the hierarchies.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com...
> how can i populate a treeview from a database?
> websites with examples would help.


Nov 16 '05 #5

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

Similar topics

0
by: T.H.M | last post by:
This is the all code. Very simple and short. I need to populate a treeView in aspx page (web form) from XML file. I get en completion error:No overload for method 'TreeNode' takes '1' arguments ....
3
by: Jan Wrage | last post by:
Hi! I would like to implement a treeview in my existing application. It should show my entire Active-Directory structure, i.e. all Groups, Containers and OUs. Could somebody help me with...
9
by: Marina | last post by:
Hello! I have a database with some customers. Each one of them has 3 other customers under him etc. (something like an MLM system). Now, I want to create a treeview with this. Eg. C1 C11...
2
by: Dave Wurtz | last post by:
All, I have a treeview on my form that has a lot of nodes on it. I would like to populate this treeview on another thread so my form will still paint while it is being populated. I have...
1
by: john wright | last post by:
I have my code done to populate a treeview, but when I move it to the backgroundworker I get an error "Action being performed on this control is being called from the wrong thread. Marshal to the...
6
by: Beginner | last post by:
Hi, I'm trying to populate a TreeView from an existing and filled in ListView (lvwBuild). lvwBuild is a basic two column listview which can have any number of rows. I would like the first...
0
by: Patrick | last post by:
Hi, Im trying to populate my treeview control onmy webpage with the information that is stored in a xml file, but i cant seem to find any good references about it. The xml file looks like this. ...
2
by: fiorea | last post by:
I have a cascading menu, which works great. Now I am trying to populate the menu from a databas, using ASP. If anyone can shed some light in this, please help. I can provide whatever code...
0
by: xmail123 | last post by:
How to populate a treeview from a dataset I am very new to C#. I need to create a Windows form that will read a SQL table and populate a treeview. I can connect to the DB, create the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.