Results 1 to 7 of 7
Thread: Populate listview with folders?
-
08-12-2012 #1
Populate listview with folders?
Does anyone know how to populate a listview with actual folders, not files? That's all.
Thanks
-
08-12-2012 #2
Re: Populate listview with folders?
Wouldn't it make more sense to use a treee view? Set the Parent node as the folder and then child nodes as the files. Just loop through the folder and list all the files.
-
08-12-2012 #3
Re: Populate listview with folders?
-
08-12-2012 #4
Re: Populate listview with folders?
I do not believe you can do this i know you can do files but not folders
i am not sureI am the true Sith one so powerful He snaps his fingers and whole systems die
don't click this link...
-
08-12-2012 #5
Re: Populate listview with folders?
Yeah, you can loop through folders and get their names... lol.
I don't know if this is right, kinda just made it in np++
Code:FolderBrowserDialog fbd = new FolderBrowserDialog(); if (fbd.ShowDialog() == DialogResult.OK) { DirectoryInfo di = new DirectoryInfo(fbd.SelectedPath); foreach (System.IO.DirectoryInfo folders in di.GetDirectories()) { listview.Items.Add(folders.Name); } }
-
The Following User Says Thank You to Brandon For This Useful Post:
Smart (08-12-2012)
-
08-12-2012 #6
-
08-12-2012 #7
-
The Following User Says Thank You to abis24 For This Useful Post:
Smart (08-13-2012)
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)



LinkBack URL
About LinkBacks

Reply With Quote










Bookmarks