How to draw a Binary Tree Dynamically from Database, in ASP.NET C#

Reply

Join Date: Mar 2008
Posts: 10
Reputation: -mk- is an unknown quantity at this point 
Solved Threads: 0
-mk- -mk- is offline Offline
Newbie Poster

How to draw a Binary Tree Dynamically from Database, in ASP.NET C#

 
0
  #1
Jan 6th, 2009
Hi, I have a database table which stores the information on the Node relationship.

In the table tblNode, I have :

tlbNodeRelation

NodeID - (The ID of the node)

ParentID
- (The ID of the Parent Node)

Position
- (The position this Node is in under the Parent Node. Either Left or Right)

then in another table where we store the information of the Node,



tblNodeData

NodeID

Username

Email


Now I need to draw out a binary tree, it has to be dynamic, as the Node might be added / deleted.

And I wish to create a link to the user profile when a person click on a certain node. Something visual like this.

http://img132.imageshack.us/img132/5...arytreemt6.jpg

When i click each of the node, it will go to the profile page of the user.

I have no idea where to start this one, maybe a nested repeater ??

Thanks for all inputs and comments.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 123
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

Re: How to draw a Binary Tree Dynamically from Database, in ASP.NET C#

 
0
  #2
Jan 6th, 2009
last year i created a web custom control that achieves this. I will try to find it for you. My control was based on the information taken from http://aspalliance.com/732, you can use that tutorial to achieve that, all i did was to embed that process into web custom control.
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 10
Reputation: -mk- is an unknown quantity at this point 
Solved Threads: 0
-mk- -mk- is offline Offline
Newbie Poster

Re: How to draw a Binary Tree Dynamically from Database, in ASP.NET C#

 
0
  #3
Jan 6th, 2009
nice tutorial. But i require the tree to be horizontal and with left and right sides.

any ideas that can be done ?

anyhow, thanks for your reply, it really helps me.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 123
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

Re: How to draw a Binary Tree Dynamically from Database, in ASP.NET C#

 
0
  #4
Jan 7th, 2009
if you want to achieve such a thing you should write your custom web control. it is not that hard, you are going to render pure html using the data from your database. Your visual representation logic is the hardest part i think. In html you dont have many tools to create a horizontal tree view like a chart.
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 3396 | Replies: 3
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC