RadProgressArea doesn't disappear on cancelling the upload

5 posts, 0 answers
  1. Phanish
    Phanish avatar
    8 posts
    Member since:
    Dec 2014

    Posted 04 Jun 2015 Link to this post

    Whenever I try to click on cancel button 'during' a file upload, the ProgressArea doesn't disappear. Is there any way where I can either programatically disable/hide the cancel button during the upload or hide the ProgressArea after clicking on the cancel button.

     

    I tried using the following code:

     

    function onClientProgressUpdating()

    {

    $telerik.$(".ruCancel").hide(); 

    }

     

    function onClientFileUploaded()

    {

    $telerik.$(".ruCancel").show(); 

    }

  2. Phanish
    Phanish avatar
    8 posts
    Member since:
    Dec 2014

    Posted 04 Jun 2015 in reply to Phanish Link to this post

    On using the above code, the runtime Cancel button is hidden but doesn't show again.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ivan Danchev
    Admin
    Ivan Danchev avatar
    832 posts

    Posted 08 Jun 2015 Link to this post

    Hello,

    If you are trying to hide the RadProgressArea here's how you can do it:
    var area = $find('<%=RadProgressArea1.ClientID%>');
    area.get_element().style.display = "none";

    You can hide the Cancel button using hide() but showing it in the onClientFileUploaded event handler is not possible, because the button is added dynamically when a file is selected for upload and removed when the file is uploaded. It can be visible only during the file upload.

    Regards,
    Ivan Danchev
    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
  5. Phanish
    Phanish avatar
    8 posts
    Member since:
    Dec 2014

    Posted 09 Jun 2015 in reply to Ivan Danchev Link to this post

    Hi Ivan,

    I tried to cancel the ongoing upload in IE10,11 and Chrome, where the functionality was working fine and as expected the Progress Area disappears. But in the case of IE9 even in the compatibility view, the progress area still shows even fter the clicking on the cancel button.

    Also,

    I have tried to hide the Progress Area using the above code also, which works, but later on when I upload a file it doesnt show at all.

    Regards

    Phanish

     

  6. Ivan Danchev
    Admin
    Ivan Danchev avatar
    832 posts

    Posted 12 Jun 2015 Link to this post

    Hello Phanish,

    I am afraid we were not able to reproduce this behavior with the ProgressArea not disappearing when you cancel an upload in IE9. Could you please try uploading/cancelling the upload in this demo and check if you can reproduce the issue?

    On showing the ProgressArea, once you've hidden it if you want to show it when the user starts uploading another file you can subscribe to the RadAsyncUpload's OnClientFileSelected client-side event and show the ProgressArea in its handler:
    function OnClientFileSelected(sender, args) {
        var area = $find('<%=RadProgressArea1.ClientID%>');
        area.get_element().style.display = "block";
    }

    Regards,
    Ivan Danchev
    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
UI for ASP.NET Ajax is Ready for VS 2017