populating treeview from database table

B

babu17

hi ,

I have a database table with 3 columns

table1:

eid ename parentid
0 root 0
1 child1 0
2 child2 0
3 gchild1 1
4 gchild2 1
5 gchild3 2
6 gchild4 2
7 ggchild1 3
..... and so on.

now i want to populate the ASP.NET and C# tree view with the table
entries by querying the eids and parentids.
i am using ASP.NET 1.1. so i am using microsoft web controls.

TreeView:

Root
---child1
------gchild1
----------ggchild1
------gchild2
---child2
------gchild3
------gchild4
and so on.....

Can some one point to some logic or to some document.
thanks
 
M

Michael Nemtsev

Hello babu17,

Get the DataSet/DataTable with your data from SQLServer
and fill up your tree manually by iterating throught the DataTable records

b> hi ,
b>
b> I have a database table with 3 columns
b>
b> table1:
b>
b> eid ename parentid
b> 0 root 0
b> 1 child1 0
b> 2 child2 0
b> 3 gchild1 1
b> 4 gchild2 1
b> 5 gchild3 2
b> 6 gchild4 2
b> 7 ggchild1 3
b> .... and so on.
b> now i want to populate the ASP.NET and C# tree view with the table
b> entries by querying the eids and parentids.
b> i am using ASP.NET 1.1. so i am using microsoft web controls.
b> TreeView:
b>
b> Root
b> ---child1
b> ------gchild1
b> ----------ggchild1
b> ------gchild2
b> ---child2
b> ------gchild3
b> ------gchild4
b> and so on.....
b> Can some one point to some logic or to some document. thanks
b>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
B

babu17

hi ,

Thanks for reply , i am using oracle, and can u post some logic how to
iterate.
 
M

Michael Nemtsev

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top