Display files and subfolders in Grid

D

DavidC

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()
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top