refresh scheduler error

2 posts, 0 answers
  1. david
    david avatar
    210 posts
    Member since:
    May 2007

    Posted 13 Aug 2015 Link to this post

    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>

  2. david
    david avatar
    210 posts
    Member since:
    May 2007

    Posted 15 Aug 2015 in reply to david Link to this post

    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

     

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top