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

listing file names from a folder in radcombobox

2 Answers 113 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
geetha priya
Top achievements
Rank 1
geetha priya asked on 04 Jun 2010, 08:16 AM
hi

how to list directory files in a radcombobox?

please help me..
thanks in advance...

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 04 Jun 2010, 08:53 AM
Hi geetha Priya,

I hope the following code snippet will help you in achieving this.

C#:
 
    DirectoryInfo di = new DirectoryInfo("E:/Files/Today");  
    FileInfo[] rgFiles = di.GetFiles("*.*");  
    foreach (FileInfo fi in rgFiles)  
    {  
        RadComboBox1.Items.Add(new RadComboBoxItem(fi.Name));  
    } 


Happy coding :)
Princy.
0
geetha priya
Top achievements
Rank 1
answered on 04 Jun 2010, 12:17 PM
hi!

it works fine..

thanks ...
Tags
ComboBox
Asked by
geetha priya
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
geetha priya
Top achievements
Rank 1
Share this question
or