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

RadProgress misbehaves when in an updatePanel (With example code!)

2 Answers 97 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 18 May 2011, 06:18 PM
I have a button in an updatepanel, with a RadProgressManager/Area thing going on. The Area is set with RegisterForSubmit="false" and the button has an onclientclicked="showProg", which is a function which calls getRadProgressManager().startProgressPolling();

First click shows the progress bar, but when it's finished the progress bar disappears and then reappears very quickly (it should stay gone).

Second click shows the completed progress bar from before, for the correct duration, then hides it (and it doesn't reappear). (it should show the correct progress sequence).

Subsequent clicks behave as the second.

Display.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <asp:UpdatePanel runat="server">
    <ContentTemplate>
        <telerik:RadButton ID="btn1" runat="server" Text="Go!" OnClick="btn" OnClientClicked="showProg">
    </telerik:RadButton>
    <telerik:RadProgressManager ID="RadProgressManager1" Runat="server" RegisterForSubmit="false" />
    <telerik:RadProgressArea ID="RadProgressArea1" Runat="server">
    </telerik:RadProgressArea>
</ContentTemplate>
    </asp:UpdatePanel>
    </form>
    <script type="text/javascript">
        function showProg() {
            getRadProgressManager().startProgressPolling();
        }
    </script>
</body>
</html>

Display.aspx.cs:
using System;
using System.Threading;
using Telerik.Web.UI;
 
public partial class Default : System.Web.UI.Page
{
    protected void btn(object sender, EventArgs e)
    {
        var prog = RadProgressContext.Current;
        for (int i = 0; i < 10; i++)
        {
            prog.PrimaryPercent = (i+1) * 10;
            prog.CurrentOperationText = String.Format("Doing step {0} of 10", i + 1);
            Thread.Sleep(TimeSpan.FromSeconds(0.5));
        }
        prog.OperationComplete = true;
    }
}


(I would attach the zipped solution, but the attach file dialog only permits images)

2 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 19 May 2011, 01:40 PM
0
Peter Filipov
Telerik team
answered on 24 May 2011, 09:09 AM
Hello Greg,

I was able to reproduce your issue. It has been forwarded to the development team for further investigation.

Regards,
Peter Filipov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Upload (Obsolete)
Asked by
Greg
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Peter Filipov
Telerik team
Share this question
or