populate treeview from databas

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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 said:
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]
- (e-mail address removed)

Mike said:
how can i populate a treeview from a database?
websites with examples would help.
 
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]
- (e-mail address removed)

Mike said:
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 said:
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]
- (e-mail address removed)

Mike said:
how can i populate a treeview from a database?
websites with examples would help.
 
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 said:
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]
- (e-mail address removed)

Mike said:
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 said:
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]
- (e-mail address removed)

how can i populate a treeview from a database?
websites with examples would help.
 
Back
Top