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

RadAjaxManager with Disabled M$ Timer

3 Answers 46 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 27 Oct 2008, 01:07 AM
I have an M$ timer which by default should not start. To my knowledge the only way to do this is to set the enabled property of the Timer to false. I also have a radajaxmanager which should control the various postbacks for the page, as well as postbacks from the timer.

This creates a problem however, as when I set the enabled property of the timer to false, the radajaxmanager can't see it and throws an error, as well as killing all other ajax calls handled by the radajaxmanager. I was hoping that I could use the radAjaxTimer seems to support such functionality through the autoStart property, however when I add it to my page the control isn' recognised.

Is there any viable solution to this whereby I can make the M$ timer not enabled but still handle its postbacks centrally through a radajaxmanager?

Thanks,
Mark

3 Answers, 1 is accepted

Sort by
0
Mark
Top achievements
Rank 1
answered on 27 Oct 2008, 06:05 AM
After investigating this further today, I think I've found that the problem is actually that I had two "listeners" for the same panel, which was causing multiple postbacks. This has now been resolved :)
0
Mark
Top achievements
Rank 1
answered on 29 Oct 2008, 05:53 AM
Unfortunately I was wrong, I haven't actually solved the problem.
Essentially what I have is a radgrid, with a label and a timer. When the grid fires a postback, the label is changed to provide a user notifcation that the database has been updated. The timer is instigated at this point, where it ticks to 5 seconds, then fires another postback and the label text is reset so that the message dissapears.

The following code block handles the ajax:
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="false"
    <AjaxSettings> 
      <telerik:AjaxSetting AjaxControlID="rdgSiteAdmin"
        <UpdatedControls> 
          <telerik:AjaxUpdatedControl ControlID="rdgSiteAdmin" /> 
          <telerik:AjaxUpdatedControl ControlID="lblSiteAdminStatus" /> 
        </UpdatedControls> 
      </telerik:AjaxSetting> 
    </AjaxSettings> 
  </telerik:RadAjaxManager> 

You'll notice that at no point do I try to handle the timer postbacks, yet because the radgrid adds a script manager the timer seems to automatically want to fire ajax calls instead of regular postbacks. Is this expected, or a bug?

There is also the problem in that if I add a new ajaxSetting or ajaxupdatedcontrol for the timer, it throws an ambiguous error and kills all ajax calls.

Any ideas?

0
Maria Ilieva
Telerik team
answered on 29 Oct 2008, 10:14 AM
Hello Mark,

Could you please test your application using regular asp UpdatePanel instead of RadAjax? Let us know if the MS Timer behaves the same way in this case. We believe the problem is mostly Timer related than RadControls.

Greetings,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Mark
Top achievements
Rank 1
Answers by
Mark
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or