Link to home
Start Free TrialLog in
Avatar of cadwal01
cadwal01

asked on

Multi-Level Treeview

I have a table that has ten columns that represent a hierarchal structure that I want to visually represent in a treeview.  Looking for the best way to load the structure.  The columns would be like

Lev1
Lev2
Lev3

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of StealthyDev
StealthyDev

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sybe
sybe

Is it a recursive table? In that case I prefer to use a "FOR XML" query to get the data in XML and an XSL file with a recursive template to build the tree.
This is how you can populate TreeView using XML:

http://support.microsoft.com/kb/317597
So, for the TreeView control you need the XML to already be hierarchical structured. You don't get that easily from a recursive table in a database.

But the matter here is if the table is recursive. From the description in the question it does not look that way, because of the "ten columns" remark. Please, show the table design.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial