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

RadProgressArea doesn't disappear on cancelling the upload

4 Answers 84 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Phanish
Top achievements
Rank 1
Phanish asked on 04 Jun 2015, 09:30 AM

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(); 

}

4 Answers, 1 is accepted

Sort by
0
Phanish
Top achievements
Rank 1
answered on 04 Jun 2015, 09:34 AM
On using the above code, the runtime Cancel button is hidden but doesn't show again.
0
Ivan Danchev
Telerik team
answered on 08 Jun 2015, 02:48 PM
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
0
Phanish
Top achievements
Rank 1
answered on 09 Jun 2015, 01:14 PM

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

 

0
Ivan Danchev
Telerik team
answered on 12 Jun 2015, 08:07 AM
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
Tags
AsyncUpload
Asked by
Phanish
Top achievements
Rank 1
Answers by
Phanish
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or