2 Answers, 1 is accepted
0
Hello Mauro,
You can try subscribing to the OnClientProgressUpdating event of the RadProgressManager and cancel the request (then refresh the page) as shown in the example below:
I hope this helps.
All the best,
Veskoni
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You can try subscribing to the OnClientProgressUpdating event of the RadProgressManager and cancel the request (then refresh the page) as shown in the example below:
<telerik:RadProgressManager ID="RadProgressManager1" runat="server" OnClientProgressUpdating="OnClientProgressUpdatingHandler" /> |
<telerik:RadProgressArea ID="RadProgressArea1" runat="server" DisplayCancelButton="true"> |
</telerik:RadProgressArea> |
<telerik:RadUpload ID="RadUpload1" runat="server"> |
</telerik:RadUpload> |
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /> |
<script type="text/javascript"> |
function OnClientProgressUpdatingHandler(sender, eventArgs) |
{ |
var progressArea = $find("<%= RadProgressArea1.ClientID %>"); |
if (progressArea.cancelClicked) |
{ |
progressArea.cancelRequest(); |
window.location.reload(); |
} |
} |
</script> |
I hope this helps.
All the best,
Veskoni
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jason
Top achievements
Rank 1
answered on 11 Mar 2009, 07:56 PM
I'm trying to do some custom manipulation of the HTML on cancel (I'm hiding the submit form on submit, and I need to un-hide it on cancel). So I tried the code above, but the handler is never being fired after I click Cancel.
Here's my code:
Just a note, the reason for the asp:Literal is that my upload form is in a RadWindow, and putting <% %> tags in there causes errors. Here's what it looks like when it goes to the browser:
Why isn't the handler being called after cancel?
Here's my code:
function OnClientProgressUpdatingHandler(sender, eventArgs) { |
var progressArea = $find("<asp:Literal ID="litRadUploadClientId" runat="server" />"); |
if (progressArea.cancelClicked) { |
window.alert("cancel has been clicked"); |
progressArea.cancelRequest(); |
document.getElementById("tblUploadForm").style.display = ""; |
} |
} |
Just a note, the reason for the asp:Literal is that my upload form is in a RadWindow, and putting <% %> tags in there causes errors. Here's what it looks like when it goes to the browser:
function OnClientProgressUpdatingHandler(sender, eventArgs) { |
var progressArea = $find("RadProgressArea1"); |
if (progressArea.cancelClicked) { |
window.alert("cancel has been clicked"); |
progressArea.cancelRequest(); |
document.getElementById("tblUploadForm").style.display = ""; |
} |
} |
Why isn't the handler being called after cancel?