Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
UserID parentID Position
1 0 0
2 1 0
3 1 1
4 3 0
5 3 1



here position can be 0 or 1 ..i.e 0 for left and 1 for right

Now the scenario is:

on current page lets assume i have a userID of a user in a string variable lets say 1 so what i am trying to do is i need to create a tree for that particular userID.
the way i am thinking we could achieve is -

first we will find out in that database all entries who have parentID as this userId( '1' in this case) so we will get list of nodes which are child to this userID
then will run this in recursion so that for each of that child will find out the tree ( there child's and so on)

once this tree on that userID( in a temporary database) is build i need to show this in graphical form...

for above data it should generate
http://tinypic.com/r/30bedxk/7
Posted
Updated 1-Nov-10 0:29am
v5

Please check the below link. At the first time I also use the concept from there.

http://stackoverflow.com/questions/2572721/recursive-treeview-in-asp-ne[^]
 
Share this answer
 
What have you tried so far? If you post some code here someone maybe able to help you better.
 
Share this answer
 
Comments
ketan541 1-Nov-10 6:15am    
Actually I have not yet started so want help with some tutorial or something ..
If there is any ready ASP.NET control for horizontal tree view then i would like to know about it ..

Any help is appreciated...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900