-
May 19th, 2011, 01:05 PM
#1
Treeview from SQL Table
I have looked through a few SQL hierarchy tutorials, but none of them made much sense for my application. Perhaps I am just not understanding them correctly. I'm writing a C# ASP.NET application and I would like to create a tree view hierarchy from SQL data.
This is how the hierarchy would work:
HTML Code:
SQL TABLE
ID | Location ID | Name
_______| __________ |_____________
1331 | 1331 | House
1321 | 1331 | Room
2141 | 1321 | Bed
1251 | 2231 | Gym
If the ID and Location ID are the same, this would determine the top Parent. Any Children of that Parent would have the same Location ID as the Parent. Any Grandchildren of that Child would have a Location ID equal to the ID of the Child, and so on.
For the above example:
HTML Code:
- House
-- Room
--- Bed
Any help or direction to easy to follow tutorials would be greatly appreciated.
Thanks.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|