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

Hiding RadProgressArea on completed with AJAX

3 Answers 216 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 18 May 2011, 09:31 PM
http://www.telerik.com/help/aspnet-ajax/upload-custom-progress-monitoring-with-ajax.html

I am wanting to auto-hide the RadProgressArea on completion using AJAX - it does this automatically with a postback, but within an UpdatePanel, it just stays open after completion.
Referring to the above link, I have tried wrapping the RadProgressArea inside the UpdatePanel as well as not. I am having trouble with hiding the RadProgressArea on completion. I am using a Custom Progress, measuring a foreach loop and not uploading files.
How am I supposed to hide the RadProgressArea on completion? I have tried on client-side via the .hide() function and OnClientProgressUpdating event but this hides it as soon as it appears - before it's complete.

Thanks

3 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 19 May 2011, 01:38 PM
Figured it out. Use a RadAjaxManager instead of RadAjaxPanel or UpdatePanel:

<telerik:RadScriptBlock id="RadScriptBlock1" runat="server">
<script type="text/javascript"  
function startProgress() {
getRadProgressManager().startProgressPolling();   
}
function hideProgress() {   
var area = $find('<%=RadProgressArea1.ClientID%>');
area.cancelClicked = true;   
}
</script  
</telerik:RadScriptBlock>


<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<ClientEvents OnRequestStart="startProgress" OnResponseEnd="hideProgress" />   
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="SubmitButton"  
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="Label1" />   
</UpdatedControls>
</telerik:AjaxSetting  
</AjaxSettings>
</telerik:RadAjaxManager>
0
ying
Top achievements
Rank 1
answered on 30 May 2011, 09:53 AM
does it need to import anything???

<ClientEvents OnRequestStart="startProgress" OnResponseEnd="hideProgress" />


client event is not supported, any solution???
0
David
Top achievements
Rank 1
answered on 31 May 2011, 12:43 PM
Just the Telerik.Web.UI assembly. Make sure you have the latest version, too, I guess.
Tags
Ajax
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
ying
Top achievements
Rank 1
Share this question
or