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

[Solved] Working with RadAjaxTimer

3 Answers 298 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
joe
Top achievements
Rank 1
joe asked on 29 Aug 2007, 02:32 PM
I have just upgraded 1 page to the new Prometheous AjaxManager (to solve another conflict.) However, I have a strange new problem. I have multiple RadAjaxTimers on that page. I also have code in the Page_Load that is wraped in this statement:

If Not RadAjaxManager1.IsAjaxRequest Then
....

This code block does not get hit on the first 2 timer tick events, as expected. But on the 3rd tick it does get hit. I am curioius why? and why only on the 3rd tick and not the first 2 ticks? Has anyone else experienced this before? Thanks.

3 Answers, 1 is accepted

Sort by
0
joe
Top achievements
Rank 1
answered on 29 Aug 2007, 08:08 PM

I have another oddity that is caused with the Prometheous Ajax control that has not come up with v1.7.2

I have a timer (timer1) that is set to click every 1 sec and check a session variable. If the session is true, then it performs Timer2.Start() command for a second timer (timer2). This all works fine except when I switched to the Prometheous, the Timer2.Tick event never fires. I have stepped through the code and in fact the Timer1.Tick event hits the start command and should be starting the second timer.

The Ajax settings for Timer1 are:

<telerik:AjaxSetting AjaxControlID="RadAjaxTimer1">  
        <UpdatedControls> 
            <telerik:AjaxUpdatedControl ControlID="grdAssignment" /> 
            <telerik:AjaxUpdatedControl ControlID="RadAjaxTimer1" /> 
            <telerik:AjaxUpdatedControl ControlID="tmrTerps" /> 
            <telerik:AjaxUpdatedControl ControlID="tmrLocation" /> 
            <telerik:AjaxUpdatedControl ControlID="tmrConsumer" /> 
            <telerik:AjaxUpdatedControl ControlID="tmrClient" /> 
            <telerik:AjaxUpdatedControl ControlID="tmrExtraCost" /> 
            <telerik:AjaxUpdatedControl ControlID="tmrPrice" /> 
        </UpdatedControls> 
    </telerik:AjaxSetting> 


and for Timer2 are:

 <telerik:AjaxSetting AjaxControlID="tmrTerps">  
        <UpdatedControls> 
            <telerik:AjaxUpdatedControl ControlID="grdAssignment" /> 
            <telerik:AjaxUpdatedControl ControlID="lblTerps" LoadingPanelID="AjaxLoadingPanel1" /> 
            <telerik:AjaxUpdatedControl ControlID="RadAjaxTimer1" /> 
            <telerik:AjaxUpdatedControl ControlID="tmrTerps" /> 
        </UpdatedControls> 
    </telerik:AjaxSetting> 


Is there something different that I need to do when moving to the Prometheous control - i.e. to I need to set the Ajax of Timer1 to update something else to get the Timer2.Tick event to fire after it has been started during an Ajax request? Again the only thing I changed was the RadAjaxManager from a radA: to telerik: in  the html declaration. Everything worked fine in radA:

Thanks.

0
Steve
Telerik team
answered on 30 Aug 2007, 12:43 PM
Hello Joe,

Unfortunately you are correct about the Start() and Stop() methods of the timer when used in MS AJAX context. I have logged this issue in our system and we will do our best to resolve it for the official release.
As for the If Not RadAjaxManager1.IsAjaxRequest Then check - we could not reproduce this on our end. It is only hit on initial load and postback requests - can you elaborate on how to replicate this?

Sorry for the inconvenience once again.

Kind regards,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
joe
Top achievements
Rank 1
answered on 05 Sep 2007, 12:18 PM
I was experiencing the problem intermittently, but it was happening around the .Tick events, so I am thinking the 2 are somehow related. I removed some of the .Tick events and tested it again, and it all worked fine.....so I'll guess that the 2 are connected.

Thanks.
Tags
Ajax
Asked by
joe
Top achievements
Rank 1
Answers by
joe
Top achievements
Rank 1
Steve
Telerik team
Share this question
or