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

How to dsplay directory contents and be able to download the indivcual files

2 Answers 57 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
stuart
Top achievements
Rank 1
stuart asked on 02 Jan 2009, 08:39 PM
Hello,

I am designing an area of our employee site that would enable employees to download MS Office documents (XLS, DOC, etc). the directory containing the documents has two subdirectories (d:\website\aspnet\employee\downloads\employee_sched\ and d:\website\aspnet\employee\downloads\doctor_sched\). I would like the content of these directories to dynamically populate the RAD TreeView control as many files are added and removed daily. From the look of some of the other posts it can be done using AJAX Load-on-Demand Directory and/or FileSystemDataSource class but I have yet to figure out how to do so. Is there a tutorial or example code that does function?

THanks for your help.

Stu

2 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 05 Jan 2009, 10:28 AM
Hi stuart,

The fastest way is to use the RadFileExplorer control. You can subscribe to the OnClientItemClick event and define its handler as follows:

<script type="text/javascript"
function OnClientItemClickHandler(sender, eventArgs) 
    window.open(eventArgs.get_path());     
</script>       

I hope this helps.

Sincerely yours,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
stuart
Top achievements
Rank 1
answered on 06 Jan 2009, 05:37 PM
Exactly what I needed. Thanks for your prompt reply and fantastic control set!

Stu
Tags
TreeView
Asked by
stuart
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
stuart
Top achievements
Rank 1
Share this question
or