Display files and subfolders in Grid

Discussion in 'ASP .Net' started by DavidC, Aug 5, 2010.

  1. DavidC

    DavidC Guest

    I have a GridView that is displaying all the files and in a specific
    directory and it works fine. However, there are now folders (subfolders)
    inside that directory that I would also like to display (maybe with a folder
    icon which I can figure out). How can I get all files and folders to display
    in my GridView? Below is the portion of code that I now use to display the
    files. Thanks.

    Dim dirInfo As New DirectoryInfo(strPathPhy)
    Dim fileInfoArray() As FileInfo = dirInfo.GetFiles()

    Array.Sort(fileInfoArray, New
    CompareFileInfoEntries(compareMethod))
    articleList.DataSource = fileInfoArray
    articleList.DataBind()


    --
    David
     
    DavidC, Aug 5, 2010
    #1
    1. Advertisements

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. Guest
    Replies:
    4
    Views:
    1,022
    Eliyahu Goldin
    Jan 4, 2005
  2. Tatyana
    Replies:
    3
    Views:
    4,661
  3. markm75
    Replies:
    0
    Views:
    393
    markm75
    May 6, 2008
  4. grasp06110

    tomcat lib folder and subfolders

    grasp06110, Jul 13, 2009, in forum: Java
    Replies:
    8
    Views:
    2,250
    iryndin
    Aug 4, 2009
  5. dotosu

    authentication and authorization in subfolders

    dotosu, Jul 17, 2003, in forum: ASP .Net Security
    Replies:
    1
    Views:
    227
    Teemu Keiski
    Jul 17, 2003
  6. Jay

    Subfolders and security, please help!!

    Jay, Dec 16, 2003, in forum: ASP .Net Security
    Replies:
    3
    Views:
    243
    Guest
    Dec 16, 2003
  7. Alont
    Replies:
    13
    Views:
    433
    Bart Lateur
    Sep 24, 2004
  8. Replies:
    17
    Views:
    307
    Rustom Mody
    May 22, 2014
Loading...