This is a migrated thread and some comments may be shown as answers.
RadProgressManager OnClientProgressStarted running on any RadAjax postback
4 Answers 12 Views
This is a migrated thread and some comments may be shown as answers.
Brent Hetland
Top achievements
Rank 1
Brent Hetland asked on 12 Jan 2016, 02:07 PM

Hi,

I am using version 2015.1.401.40 of the ASP.NET for AJAX controls.

I have an ascx control that contains the RadUpload control along with a RadProgressArea and a RadProgressManager.

I have it in an aspx file that uses the RadAjaxManager and the aspx control also contains many other ascx controls.

Many of the ascx controls are being updated by the RadAjaxManager...

PROBLEM:

When I do anything on the aspx form that does an ajax postback, the OnClientProgressStarted event is being fired on the RadProgressManager.

As an example, I have an ajaxed ascx control that contains a telerik radgrid and when I put a row into edit mode on that grid, the OnClientProgressStarted event is fired on the RadProgressManager.  I know that, because I call a javascript function from it and have put a debugger statement in it...

This causes totally undesirable behavior.  I only want that event to fire when I'm using the upload control...

Q. Can you tell me if there is anything I can do to try to correct this behavior and NOT have OnClientProgressStarted fired on every ajax postback on the page?

Thanks,

Brent

4 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 15 Jan 2016, 11:41 AM
Hi Brent,

Please look here: http://docs.telerik.com/devtools/aspnet-ajax/controls/progressarea/progress-monitoring-with-ajax If this doesn't help please attach sample project, so we can review your code.

Regards,
Hristo Valyavicharski
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
Brent Hetland
Top achievements
Rank 1
answered on 15 Jan 2016, 11:47 AM

Hi Hristo,

Thanks for the reply, but the content in that link doesn't have anything to do with my post.

I understand why you want a sample application... but I don't have time to stop and put something together and there may be many factors involved in the the cause of my problem. So to workaround the problem for now, when I use my ascx control that contains the upload control in the scenario that causes the problem, I simply don't assign a javascript function call to the OnClientProgressStarted event.

I'll consider this closed / unanswered, as I don't think any of us has time to spend on pursuing the cause / resolution.

Regards,

Brent

0
Accepted
Hristo Valyavicharski
Telerik team
answered on 19 Jan 2016, 09:56 AM
Hi Brent,

I managed to reproduce this behavior with the following code:
<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 runat="server" ID="ajaxManager">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="btnAjax">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="progressManager" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadProgressManager
            runat="server"
            ID="progressManager"
            OnClientProgressStarted="OnClientProgressStarted"></telerik:RadProgressManager>
        <telerik:RadButton runat="server" ID="btnAjax" Text="Ajax" />
        <script type="text/javascript">
            function OnClientProgressStarted(sender, args) {
                console.log('onClientProgressStarted');
            }
        </script>

Actually this is not error. By default the RadProgressManager handles the submit event of the form. That's why the OnClientProgressStarted event is fired and ajax call. This what you could do is to set the RegisterForSubmit property to false.

        <telerik:RadProgressManager
            runat="server"
            RegisterForSubmit="false"
            ID="progressManager"
            OnClientProgressStarted="OnClientProgressStarted">
        </telerik:RadProgressManager>

But you will have to start progress manually:

var progressManager = $find("progressManager ");
progressManager.startProgressPolling();

Regards,
Hristo Valyavicharski
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
Brent Hetland
Top achievements
Rank 1
answered on 19 Jan 2016, 12:06 PM

Thanks for the extra effort Hristo. I think I will go with my workaround. When I use that control with other controls that do postbacks, I'll simply NOT assign a javascript function to the OnClientProgressStarted event. I was only doing that to display a modal div to prevent other things from being clicked... not a big deal.

Thanks again for the follow up.

Brent

Asked by
Brent Hetland
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Brent Hetland
Top achievements
Rank 1
Share this question
or