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

[Solved] AjaxManager doesn't fire 1st time

4 Answers 77 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jonathan Levy
Top achievements
Rank 1
Jonathan Levy asked on 19 Apr 2009, 04:23 PM
Hi All

I have an ajax manager on my page controlling the scheduler. This works except the first time I do something. If I drag an appointment around the ajax doesn't fire. When I do this a 2nd time it does fire and performs an update. I can't explain this and have no idea how to solve it. Any ideas?

The entire ajaxmanager, rad scheduler and all other controls are all in a usercontrol.

Here is the manager code

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnablePageHeadUpdate="false"
        DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                    <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                    <telerik:AjaxUpdatedControl ControlID="SchedulerAppointmentContextMenu" />
                    <telerik:AjaxUpdatedControl ControlID="SchedulerTimeSlotContextMenu" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                    <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                    <telerik:AjaxUpdatedControl ControlID="SchedulerAppointmentContextMenu" />
                    <telerik:AjaxUpdatedControl ControlID="SchedulerTimeSlotContextMenu" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

Thanks
Jon

4 Answers, 1 is accepted

Sort by
0
Jonathan Levy
Top achievements
Rank 1
answered on 20 Apr 2009, 08:56 PM
Hi Guys

Any ideas on this as it's a bit of a problem.

Cheers
jon
0
Iana Tsolova
Telerik team
answered on 23 Apr 2009, 09:43 AM
Hi Jonathan,

Could you please elaborate on how are you loading the user control? Are you loading it dynamically, or it is declaratively added to the page? Additionally, if the controls visble/invisible on initial load?

I would suggest that you try placing the RadAjaxManager in the main page for instance and user RadAjaxManagerProxy in the user control instead.

Find more about RadAjax and user controls in the below online resource:
http://www.telerik.com/help/aspnet-ajax/ajax-manager-proxy.html
http://www.telerik.com/help/aspnet-ajax/ajxusercontrols.html

Let me know how it goes.

Best wishes,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jonathan Levy
Top achievements
Rank 1
answered on 30 Apr 2009, 03:42 PM
Ok I've tried adding it to the containing page and having a proxy on the control but that didn't work. Our entire system is made of user controls all loaded dynamically.

We have one masterpage file, should I put it on that page or on the default page which uses the masterpage?
0
Sebastian
Telerik team
answered on 04 May 2009, 11:09 AM

Hello Jonathan,

Indeed the most convenient approach would be to put the RadAjaxManager instance on the master page and the ajax manager proxy controls inside the content pages/user controls as demonstrated on these demos:

http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/masterpage/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/usercontrol/defaultcs.aspx

Also verify that you load the user control programmatically in par with the concepts explained in these resources:
http://demos.telerik.com/aspnet-ajax/ajax/examples/common/loadingusercontrols/defaultcs.aspx
http://www.telerik.com/help/aspnet-ajax/ajxloadusercontrols.html

This would ensure that their viewstate and lifecycle will remain consistent/intact.

Kind regards,

Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Ajax
Asked by
Jonathan Levy
Top achievements
Rank 1
Answers by
Jonathan Levy
Top achievements
Rank 1
Iana Tsolova
Telerik team
Sebastian
Telerik team
Share this question
or