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

RadFileExplorer with EnableAsyncUpload = True and the Select Button

1 Answer 101 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
BRIAN
Top achievements
Rank 1
BRIAN asked on 12 Mar 2014, 04:04 PM
Hello,
Is there a way to capture an event when a user clicks the [Select] button on the AsyncUpload?

I am using a RadFileExplorer in an ASP.NET application and I have this control’s EnableAsyncUpload = true. While a user browses the page and clicks Upload on the FileExplorer toolbar, the AsyncUpload appears (as expected). The AsyncUpload displays 2 buttons: [Select] and [Upload].

I know that I can use the OnItemCommand event of FileExplorer to “do something” when the user clicks [Upload]. But is there some other FileExplorer event that I can utilize when the user clicks [Select]?

I think I posted a similar question like this about 2 years ago and I was basically told “No, it can’t be done.” Is this now possible with the latest version of FileExplorer? What I want to do is validate each filename as they are selected by the user, instead of having to validate during the upload.

Thank you

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 14 Mar 2014, 08:21 AM
Hi Brian,

The AsyncUpload control exposes an OnClientFilesSelected which is fired just after the files are selected in the FileExplorer's upload dialog and  OnClientFilesUploaded event, fired after the files are slected and uploaded in the temp folder, waiting to be uploaded when the "Upload" button is clicked. You can attach a handler to these events in a similar way:
protected void Page_Load(object sender, EventArgs e)
{
    RadFileExplorer1.AsyncUpload.OnClientFilesSelected = "ClientFilesSelected";
}
<script>
    function ClientFilesSelected(asyncUpload, args) {
        //your logic here
    }
</script>

I hope this information will be helpful for you.

Kind regards,
Vessy
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
Tags
FileExplorer
Asked by
BRIAN
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or