TreeView data load with separator character

1 posts, 0 answers
  1. Manny Khurana
    Manny Khurana avatar
    1 posts
    Member since:
    Jul 2009

    Posted 06 Sep 2009 Link to this post

    I have a database that returns values in the following format

    Electronics | Television | HDTV | Samsung
    Electronics | Music | MP3 player | Ipod
    Electronics | Music | MP3 player | Zune

    etc etc

    I would like to represent this as a tree structure

    Electronics
             -  Television
                --       HDTV  
                          --- Samsung
             - Music
                --  MP3 Player
                        --- Ipod
                        --- Zune

    I know the separator will be the '|' character.  Is there a way I can populate the TreeView control directly by reading the above string /s .
Back to Top