Clear added items of active upload control

3 posts, 0 answers
  1. Linh Hoang
    Linh Hoang avatar
    22 posts
    Member since:
    Dec 2009

    Posted 05 Jul 2015 Link to this post

    I have been following this thread (http://www.telerik.com/forums/radasyncupload-clear-items-using-serverside-code) for a similar issue.

    Issue: "I am using RadAsyncUpload to upload files. I have a 'Cancel' button which the user can click anytime after selecting the files. I want to clear the selected files - or in other words reset the RadAsyncUpload Control when 'Cancel' button is clicked." (by Liby George)

    Solution: Please include the following line of code in your click handler for the "Cancel" button.
    //JavaScript
    $telerik.$(".ruInputs li .ruRemove").click()
    This will go through the files <li> elements and click on the "Remove" link.  (by Boyan Dimitrov)

    My problem: Since there are severals RadAsyncUpload along with coresponding buttons in one page, this will clear all selected files of all upload controls for a single click . How can I clear the items of one RadAsyncUpload without affecting the others?

  2. Linh Hoang
    Linh Hoang avatar
    22 posts
    Member since:
    Dec 2009

    Posted 06 Jul 2015 Link to this post

    I have been stuck in this issue. Could anyone advice me please?

    How can I clear the items of one RadAsyncUpload (server side / client side) without affecting the others?

    Thanks a lot for any suggestion.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 08 Jul 2015 Link to this post

    Hi Linh,

    Try this:

    function removeFile(fileName) {
        $('.ruUploadProgress.ruUploadSuccess:contains('+ fileName + ')').parent().next().click();
    }


    Regards,
    Hristo Valyavicharski
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top