Clear all file inputs for radasync upload control

4 posts, 0 answers
  1. Arvind
    Arvind avatar
    40 posts
    Member since:
    Sep 2010

    Posted 14 Mar 2012 Link to this post

    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



      
  2. Bozhidar
    Admin
    Bozhidar avatar
    1188 posts

    Posted 15 Mar 2012 Link to this post

    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.
  3. Arvind
    Arvind avatar
    40 posts
    Member since:
    Sep 2010

    Posted 15 Mar 2012 Link to this post

    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

  4. Bozhidar
    Admin
    Bozhidar avatar
    1188 posts

    Posted 16 Mar 2012 Link to this post

    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.
Back to Top