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. 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. Guest
    Replies:
    4
    Views:
    894
    Eliyahu Goldin
    Jan 4, 2005
  2. Tatyana
    Replies:
    3
    Views:
    4,482
  3. markm75
    Replies:
    0
    Views:
    308
    markm75
    May 6, 2008
  4. Alont
    Replies:
    13
    Views:
    264
    Bart Lateur
    Sep 24, 2004
  5. Replies:
    17
    Views:
    93
    Rustom Mody
    May 22, 2014
Loading...

Share This Page