Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 1-Nov-10 1:05am
Edited 1-Nov-10 1:29am
v5
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

What have you tried so far? If you post some code here someone maybe able to help you better.
  Permalink  
Comments
ketan541 at 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)

  Print Answers RSS
0 George Jonsson 215
1 Kornfeld Eliyahu Peter 169
2 Zoltán Zörgő 139
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,342


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 28 Dec 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100