Populating treeview from a list of filepath

Last post 11-13-2009 3:43 PM by AZMatt. 1 replies.

Sort Posts:

  • Populating treeview from a list of filepath

    11-13-2009, 2:07 PM

    Hi,

    In a column of a table i have the below content 

    Main/
    Main/Tag       
    Main/Documents 
    Main/Source    
    Main/Sour      
    Main/Docum     
    Main/Doc       
    Main/123456    
    Main/123       
    Main/123456/1234  
    Main/123456/1234.txt 
    Main/123456/1234/kk.gif
    Main/Testing
    Main/Documents/Impact/word.doc
    Main/Documents/mytest.xls
    Main/Documents/Initial/web/app.txt
    Main/Docum/Test/Utp.txt
    Main/Testing/First/stp.xls
    Main/Testing/First/uat.xls
    Main/Testing/Temp.doc

    i want to populate all the above folder and its subfolder and files in asp.net treeview control

    Could anyone please help me to find a solution for this

    I am new to treeview control

    Thanks & Regards

    Saravanan G

  • Re: Populating treeview from a list of filepath

    11-13-2009, 3:43 PM
    • Member
      39 point Member
    • AZMatt
    • Member since 11-26-2008, 1:52 PM
    • Posts 11

    I'm sure there are more direct ways of doing this, but I would convert your data into a Web.sitemap file and then use a SiteMapDataSource to populate your TreeView.  The SiteMapDataSource has so much built-in functionality, you wouldn't have to code anything else for the TreeView to work.

Page 1 of 1 (2 items)