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

LoadingPanel is not being displayed from client side AjaxRequest.

3 Answers 192 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Brent
Top achievements
Rank 1
Brent asked on 13 Oct 2008, 12:15 PM
PROBLEM:
My problem is that I never see the Loading Panel, when I fire an ajax request with javascript code.  What am I doing wrong?

SCENARIO:
- I have an aspx page with an ajax manager, loading panel, and a bunch of ascx controls.
- My loading panel displays when a control in the page fires an ajax event.
- However my problem is that my loading panel does NOT display when my client side javascript fires the ajaxrequest method of the ajax manager.

- I generally add the ajaxsettings to my controls in Page_Load, and I have used this line in order to try to get it to display:

UCCIndexingRadAjaxManager.AjaxSettings.AddAjaxSetting(UCCIndexingRadAjaxManager, this.ucUCCIndexingFilingControlsParent.ucFilingDetails, this.UCCRadAjaxLoadingPanel);

- ucFilingDetails is a publically exposed user control, within another user control on this aspx page.  And UCCIndexingRadAjaxManager and UCCRadAjaxLoadingPanel are the ID's of my ajax manager and loading panel respectively.

- So by doing this, I am of course ajaxifying the ajax manager itself...
- Below are the declarations of my ajax manager and loading panel.  In this case, you can see that I also have ajaxified the ajaxmanager and specified a loading panel, but I do NOT do it both that way and with the code behind like I showed you above, at the same time.  I only tried doing it this way after commenting out my code-behind above.:

    <telerik:RadAjaxLoadingPanel ID="UCCRadAjaxLoadingPanel" runat="server" Height="75px" Width="75px" Transparency="50" MinDisplayTime="500">
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" />
    </telerik:RadAjaxLoadingPanel>

    <telerik:RadAjaxManager runat="server" ID="UCCIndexingRadAjaxManager" OnAjaxRequest="UCCIndexingRadAjaxManager_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="UCCIndexingRadAjaxManager">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ucUCCIndexingFilingControlsParent" LoadingPanelID="UCCRadAjaxLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

- Lastly, here is the javascript function that calls ajaxrequest.  This does fire the event and the code behind runs, but I never see the loading panel.
- As you can see with the commented out code, I have even tried to show the loading panel explicitly with code, by finding it and calling the show method.  No luck there either.

    function saveFiling()
    {
        //alert("You hit ctrl-s");
        //currentLoadingPanel = $find("ctl00_ContentPlaceHolder_UCCRadAjaxLoadingPanel");
        //currentUpdatedControl = "ctl00_ContentPlaceHolder_ucUCCIndexingFilingControlsParent_ucFilingDetails";
        //currentLoadingPanel.show(currentUpdatedControl);

        $find("<%=UCCIndexingRadAjaxManager.ClientID%>").ajaxRequest("SaveLienFiling");
    }

3 Answers, 1 is accepted

Sort by
0
Brent
Top achievements
Rank 1
answered on 13 Oct 2008, 12:38 PM
MORE INFORMATION:
- In my AddAjaxSettings statement, when I specify a specific control (like a label or textbox) within my user control, the loading panel IS displayed.  However it shows up as the same size as the control, so if I specify a textbox for instance, the loading panel is only like 20px in height and it is not fully displayed.

My goal is to have it displayed and centered over one of my user controls within this aspx page, yet when I do that, it does not show up. 

Does the information above makes sense?
0
Maria Ilieva
Telerik team
answered on 16 Oct 2008, 08:11 AM
Hi Brent,

Thank you for contacting us.

It is not supported scenario to add the User Control directly into the RadAjaxManager settings. However in order to have the LoadingPanel appearing for the whole user control you could wrap the control into regular asp Panel and add this panel into the RadAjaxManager settings instead.


Regards,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Brent
Top achievements
Rank 1
answered on 16 Oct 2008, 11:43 AM
THANK YOU!  I already had an asp panel in place, and now that I ajaxify that, the loading panel shows as expected.

Much appreciation!
Brent
Tags
Ajax
Asked by
Brent
Top achievements
Rank 1
Answers by
Brent
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or