RadAjax Loading Panel only shows on first ajax request

2 posts, 0 answers
  1. Acadia
    Acadia avatar
    211 posts
    Member since:
    May 2005

    Posted 04 May 2012 Link to this post

    This has been baffling (and infuriating me) for hours now.  I have a textbox wrapped inside a panel named:

    <asp:Panel ID="panelTest" runat="server">


    The textbox calls a javascript event when the user hits enter:
    function CatchTab(e) {
                   var keycode;
                   if (window.event) {
                       keycode = window.event.keyCode;
                   } else if (e) {
                       keycode = e.which || e.keyCode;
                   } else {
                       return true;
                   }
     
                   if (keycode == 13) {
                       //alert("User Hit Enter");
                       var empid = document.getElementById('<%= tbTmid.ClientID %>').value;
                       InitiateAjaxRequest(empid);
                   }
               }


    function InitiateAjaxRequest(arguments) {
                   var ajaxManager = $find("<%= ram2.ClientID %>");
                   alert("Initiating Request");
                   ajaxManager.ajaxRequest(arguments);
               }

    <telerik:RadAjaxManager ID="ram2" runat="server" Skin="Web20" OnRequestStart="InitiateAjaxRequest">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="ram2">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="panelTest" LoadingPanelID="loader1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="rgSc">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="panelTest" LoadingPanelID="loader1" />
                        <telerik:AjaxUpdatedControl ControlID="rwm1" LoadingPanelID="loader1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
     
        <telerik:RadAjaxLoadingPanel ID="loader1" runat="server" Skin="Web20" IsSticky="false"
                EnableViewState="true" Enabled="true">
        </telerik:RadAjaxLoadingPanel>


    For some reason the darn loading panel only wants to show up on the first ajax request.  Everything is ajaxd on subsequent requests, I just don't see any loading panel.  The textbox fills a grid within the panel.  What's even stranger is that if the value entered into the textbox does not return any grid rows, the loading panel shows up everytime!!!

    Also, I get the "Initiating Request" alert every time as well and the ajax manager object is always populated (not null).

    If anyone could please help that would be great.

    Thanks
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 09 May 2012 Link to this post

    Hello Justin,

    Could you please try to show and hide the LoadingPanel manually as shown in the following help topic:
    http://www.telerik.com/help/aspnet-ajax/ajax-show-hide-loadingpanel.html

    Give this a try and let me know if this makes any difference.

    All the best,
    Maria Ilieva
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top