This is a migrated thread and some comments may be shown as answers.

Display the contents of a folder.

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Wack
Top achievements
Rank 1
Wack asked on 14 Aug 2008, 01:33 PM
I need to display the contents of a folder in a radgrid.  How do I accomplish this?

1 Answer, 1 is accepted

Sort by
0
Nick
Top achievements
Rank 2
answered on 14 Aug 2008, 01:41 PM
If you just need files names, one easy way is to use Directory.GetFiles to get a list of files into a string[].

Then use a template column bound like this:

<%# Container.DataItem %>

That will display the array element. 

If you need more info, you can bind to a multiple dimension array as well.  Can't remember off the top of my head how to do that.

NH

Tags
Grid
Asked by
Wack
Top achievements
Rank 1
Answers by
Nick
Top achievements
Rank 2
Share this question
or