How to programmatically remove a file on RadAsyncUpload control?

6 posts, 1 answers
  1. LamKhoa
    LamKhoa avatar
    92 posts
    Member since:
    Jun 2011

    Posted 02 Aug 2011 Link to this post

    I have one or two files uploaded on RadAsyncUpload control. I would like how to programmatically remove the item (Like clicking on red "Remove" link next to each file on the RadAsyncUpload control).

    My scenario is that when user click "Process" button below, one or two file will be remove from the list.

    Thanks,

    Lamk.
  2. Answer
    Peter
    Admin
    Peter avatar
    6637 posts

    Posted 05 Aug 2011 Link to this post

    Hi Lamkhoa,

    You can use the deleteFileInputAt client side method -
    http://www.telerik.com/help/aspnet-ajax/asyncupload-client-object.html

    Regards,
    Peter
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. LamKhoa
    LamKhoa avatar
    92 posts
    Member since:
    Jun 2011

    Posted 05 Aug 2011 Link to this post

    Thanks, I got it now.
  5. Bas
    Bas avatar
    8 posts
    Member since:
    Feb 2014

    Posted 21 Feb 2014 in reply to Peter Link to this post

    Hello Peter,

    From "You can use the deleteFileInputAt client side method -"

    The method doesn't work in IE9 or lower, Can you please help me out?


    Thanks
    Bas
  6. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Feb 2014 in reply to Bas Link to this post

    Hi Bas,

    Please have a look into the sample code snippet which works fine at my end.

    ASPX:
    <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" OnClientFileUploaded="fileUploaded">
    </telerik:RadAsyncUpload>

    JavaScript:
    <script type="text/javascript">
        function fileUploaded(sender, eventArgs) {
            alert(sender.getUploadedFiles().length)
            sender.deleteFileInputAt(0);
        }
    </script>

    Please provide your code if it doesn't help.
    Thanks,
    Shinu.
  7. Bas
    Bas avatar
    8 posts
    Member since:
    Feb 2014

    Posted 06 Apr 2014 in reply to Shinu Link to this post

    Hello Shinu,

    After so long got a chance to review the older posts here. Thanks for your reply. I tried as per the sample provided by you and found that 
    "deleteFileInputAt" doesn't work at all in IE9 or below. But it works fine in IE10 , FF and Chrome. This seems like a known issue with the Telerik Rad Async upload control. But any ways thank you so much for your concern. Will get back to forum soon.


    Thanks
    Bas
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017