| | |
How to draw a Binary Tree Dynamically from Database, in ASP.NET C#
Please support our ASP.NET advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Mar 2008
Posts: 10
Reputation:
Solved Threads: 0
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.
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
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.
•
•
Join Date: Jan 2008
Posts: 2,052
Reputation:
Solved Threads: 123
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.
•
•
Join Date: Jan 2008
Posts: 2,052
Reputation:
Solved Threads: 123
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.
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: How to implement live video streaming in asp.net
- Next Thread: Getting type information using xsd
Views: 3396 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 activexcontrol advice ajax anathor application asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox child click commonfunctions compatible confirmationcodegeneration content contenttype courier css database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdown dropdownmenu edit expose feedback flash flv form formatdecimal forms formview google grid gridview homeedition hosting identity iframe iis index javascript jquery list menu migration mono mssql multistepregistration nameisnotdeclared object objects order problem ratings refer rotatepage save search security serializesmo.table session silverlight smartcard software sql sqlserver2005 suse textbox tracking typeof unauthorized update validation vb vb.net video view virtualdirectory vista visual-studio visualstudio web webarchitecture webdevelopemnt xml youareanotmemberofthedebuggerusers






