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

ajaxManager.ajaxRequest does not fire in OnClientAppointmentMoveEnd

1 Answer 144 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Nyceane
Top achievements
Rank 1
Nyceane asked on 08 Jul 2008, 06:16 PM
hey, I am trying to trigger an event through OnClientAppointmentMoveEnd in RadScheduler, but ajaxManager.ajaxRequest(argument) will not fire for some reason, it fires on any other part of the page.  someone please help me

function ScheduleMoved(sender, eventArgs)  
{     
 
       var start = formatDate(eventArgs.get_newStartTime());  
       var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");  
       var index = eventArgs.get_appointment().get_id();                      
       ajaxManager.ajaxRequest(index.toString() + '+'  + start.toString());  
 
                          
}  

1 Answer, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 09 Jul 2008, 06:54 AM
Hello Nyceane,

I've just answered your question in the support ticket you have opened.

Basically, one should be aware that the Scheduler performs a postback by itself. Since I assume you don't need two requests, triggering an additional request through the ajaxRequest is not necessary. The requirement here is to add the Scheduler as AJAX initiator and updated controls at the same time as well as add the control one is going to update into the updated controls.

        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" DefaultLoadingPanelID="AjaxUpdateClue" > 
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadScheduler1">                  
                    <UpdatedControls>                        
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" /> 
                        <telerik:AjaxUpdatedControl ControlID="Label1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
 

The RaisePostBackEvent could be used to update the label in this case instead:

        protected override void RaisePostBackEvent(IPostBackEventHandler sourceControl, string eventArgument) 
        { 
            base.RaisePostBackEvent(sourceControl, eventArgument); 
            if (sourceControl == RadScheduler1) 
            { 
                Label1.Text = "Success"
            } 
        } 

Regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
Nyceane
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Share this question
or