For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > May 2006 > Populating treeview









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Populating treeview
Mike

2006-05-31, 8:12 am

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



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com