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

refresh scheduler error

1 Answer 21 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
david
Top achievements
Rank 1
david asked on 13 Aug 2015, 03:51 PM

I'm using this http://www.telerik.com/forums/custom-advanced-form

 I copied the RadAjaxManager and Loading panel per the post. I have a JS refreshScheduler, I have a code behind ajaxrequest handler

when the advanced form closes the JS refreshScheduler fails: 
0x800a138f - JavaScript runtime error: Unable to get property 'ajaxRequest' of undefined or null reference

on    ajaxManager.ajaxRequest('RebindScheduler');

 

protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
    if (e.Argument == "RebindScheduler")
    {
        RadScheduler1.Rebind();
    }
}

 

 

    function refreshScheduler() {
        var ajaxManager = $find("RadAjaxManager1");
        ajaxManager.ajaxRequest('RebindScheduler');
    }
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
    DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <AjaxSettings>    
        <telerik:AjaxSetting AjaxControlID="RadScheduler1">
            <UpdatedControls>    
                <telerik:AjaxUpdatedControl ControlID="RadScheduler1"
                    LoadingPanelID="RadAjaxLoadingPanel1" />    
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadScheduler1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings>    
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server" Skin="Default">
    Loading...
</telerik:RadAjaxLoadingPanel>

1 Answer, 1 is accepted

Sort by
0
david
Top achievements
Rank 1
answered on 15 Aug 2015, 06:59 PM

I simplified the refresh JS to this

  function refreshCal(arg) {             $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");     }

and added the missing OnAjaxRequest="RadAjaxManager1_AjaxRequest" to call my code behind and life is good

 

Tags
Scheduler
Asked by
david
Top achievements
Rank 1
Answers by
david
Top achievements
Rank 1
Share this question
or