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

FileExplorer call CustomFileContentProvider method

3 Answers 55 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 01 Jul 2009, 03:22 PM

Is it possible, from the client side, to call a method of the RadFileExplorer's customfilecontentprovider?

I want to check for existence of a file, to warn the user before he overwrites an existing file.

Suggestions?

3 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 02 Jul 2009, 03:29 PM
Hello Jon,

You need to use the OnItemCommand event (this event is fired when a file is uploading)  of the RadFileExplorer control to check if the uploaded file already exists. This is the easiest way to achieve the desired result in your scenario.
For your convenience I have attached a simple demo to the thread.
I hope this helps.

Sincerely yours,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jon
Top achievements
Rank 1
answered on 02 Jul 2009, 06:13 PM
Fiko,

Thanks, but I am not using the Upload.. Instead, I have a RadWindow with a FileExplorer plus a Save button, and I want to do this check from the Save button, preferably right from the script that I am already calling when the Save button is pressed.

From script, I know how to get access to the RadFileExplorer object, so I wonder: Is there a method that I can call, to check file exists, or is there a way to access the content provider used by the FileExplorer so that I can call a method in that content provider?

Thanks,
-Jon
0
Fiko
Telerik team
answered on 03 Jul 2009, 10:41 AM
Hi Jon,

I am not quite sure that I understand your scenario. I need to examine your project first and once i have a better view over your case, I will do my best to provide a working solution. You could attach files to support thread and you need to open a new one in order to send your files.

In reference to your question :
There is no property or method that returns a reference to the provider used in the RadFileExplorer control, but in your scenario I suppose that the desired result can be easily achieve by using the existing features of the control. For this to be done however, I need to examine your setup.



Kind regards,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
FileExplorer
Asked by
Jon
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Jon
Top achievements
Rank 1
Share this question
or