Populating treeview

M

Mike

Hi all,

I have a dataset that contains following records:

id ref_id level
--------------------------------------
A - 0
A1 A 1
A2 A 1
A3 A 1
A11 A1 2
A12 A1 2
A21 A2 2
A31 A3 2
A211 A21 3

The column 'ref_id' is supposed to be the parent/referrer of column 'id'
That means:
A refers A1,A2 and A3
A1 refers A11,A12
and so on.

What I want to achieve is to present the above dataset using a treeview in
an ASP.NET 2.0 (VB) page, so it will displays like this:

[+] A
[+] A1
A11
A12
[+] A2
[+] A21
A211
[+] A3
A31

Can somebody please show me how to do this?

Many thanks in advance,
Mike
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top