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

Clear all file inputs for radasync upload control

3 Answers 139 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Arvind
Top achievements
Rank 1
Arvind asked on 14 Mar 2012, 03:00 PM
Hi Telerik Team,

I am trying to clear all the file inputs(all files that are uploaded) that are uploaded for RadAsync Upload control on Button click event,

My button click code is as follows:
<asp:Button ID="btnTest" runat="server" OnClientClick="return resetBatch();" Text="Reset Batch"/> 

my javascript code is as follows:

 function resetBatch() {
        var upload = $find("<%= radBatchAttachment.ClientID %>");
      var inputs = upload.getUploadedFiles();
      for (i = inputs.length - 1; i >= 0; i--) {
          upload.deleteFileInputAt(i);
      }
        return false;
    }

But I am getting a error at line "var inputs = upload.getUploadedFiles();", Please find the error image in attachment "Error.png",
and RadAsyncUpload control is not clearing the files uploaded.

when I use the following approach using the function as follows:

function resetBatch() {
       debugger;
       var upload = $find("<%= radBatchAttachment.ClientID %>");
       var count = upload._uploadedFiles.length;
       for (var i = 0; i <= (count - 1); i++) {
           upload.deleteFileInputAt(i);
       }      
       return false;
   } 

 I am getting the following error:

 that is present in attachment "ResetRadAsyncUpload.png"
Please help me in doing this. I am in big need of this.

Thanks & Regards

--------------------------------------------------------

Aravinda Chary N

Ph: 9700308156

www.manamai.com



  

3 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 15 Mar 2012, 03:22 PM
Hello Arvind,

Can you specify the version of the controls you are using?

The getUploadedFiles() method was introduced in the 2010.3.1109 version of our controls, so if you are trying to use it with an earlier version, you would get this error.
 
Kind regards,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Arvind
Top achievements
Rank 1
answered on 15 Mar 2012, 05:50 PM
Hi Telerik Team, 

The version that I am using is 10.2.8.26.
Please tell me a way to solve this problem.

Thanks & Regards

--------------------------------------------------------

Aravinda Chary N

Ph: 9700308156

www.manamai.com

0
Bozhidar
Telerik team
answered on 16 Mar 2012, 10:36 AM
Hello Arvind,

Unfortunately we no longer provide support for RadControls for ASP.NET.
 
Greetings,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
AsyncUpload
Asked by
Arvind
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Arvind
Top achievements
Rank 1
Share this question
or