Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tree node

Status
Not open for further replies.

overDeveloper

Programmer
Dec 11, 2006
58
US
I need to make some xml that will make a tree node out of 1 (if possible) result set... How would you suggest I do this... I want to make 1 query and then loop through it to produce something like:

parent 1
--- child 1a
--- child 1b
--- child 1c
parent 2
--- child 2a
--- child/parent 2b
--- child 2b1
--- child 2b2

any ideas?
 
You want to create an xml file from an existing result set then base your tree view on this?

If you just want to handle this from a database, you can create a recursive method that will populate the top nodes of your tree and then populate the child nodes. The advantage of this method is that it works for VS 2003.

I know you can set an existing xml file as the data source for a treeview control. I believe you can also map a dataset as the data source as well.

This is assuming you have VS 2005.
 
Actually I the database version doesn't matter, it matters what version of visual studio you have.

And, yeah, I have to stick up for my alma mater.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top