Populating treeview

Discussion in 'ASP .Net' started by Mike, May 31, 2006.

  1. Mike

    Mike Guest

    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
    Mike, May 31, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. naijacoder naijacoder
    Replies:
    1
    Views:
    656
    naijacoder naijacoder
    Sep 15, 2004
  2. Erland
    Replies:
    0
    Views:
    494
    Erland
    Sep 15, 2006
  3. drop
    Replies:
    0
    Views:
    517
  4. Replies:
    0
    Views:
    409
  5. chandrajit_in
    Replies:
    0
    Views:
    1,666
    chandrajit_in
    Jan 3, 2008
Loading...

Share This Page