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

[Solved] RadAjaxLoadingPanel not visible.

1 Answer 340 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
John Rogowski
Top achievements
Rank 1
John Rogowski asked on 23 Jun 2008, 08:57 PM
Okay, maybe I'm missing something here but I can't seem to get my loading panels to display on AJAX request.  The controls are obviously updated asynchronously, but the loading overlay is missing in action.  Here's the scenario:

My MasterPage has the RadScriptManager (I've also tried the standard ASP Script Manager too).  The content page has a RadAjaxManager, RadAjaxLoadingPanel, and multiple user controls.

Properties explicitly set:
EnableAjax = true
EnablePageHeadUpdate = true
EnableEmbeddedScripts = true

Each user control has its own RadAjaxManagerProxy and RadAjaxLoadingPanel (referenced in the proxy).  I gave each its own unique ID in case that was causing a conflict.  Any ideas?

1 Answer, 1 is accepted

Sort by
0
Kevin Babcock
Top achievements
Rank 1
answered on 23 Jun 2008, 11:31 PM
Hi John,

You do not have to do anything special to get the RadAjaxLoadingPanel to work properly in a User Control. In your scenario, with a master page, content page, and several user controls, you need to have a ScriptManager in your master page, a RadAjaxManager in your content page, and a RadAjaxManagerProxy in your user control. I created the following user control with the settings needed to properly display a RadAjaxLoadingPanel during an asynchronous postback:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Calculator.ascx.cs" Inherits="Calculator" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="Button1"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 
 
<asp:Panel ID="Panel1" runat="server"
    <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" /> 
    + 
    <telerik:RadNumericTextBox ID="RadNumericTextBox2" runat="server" />     
    = 
    <telerik:RadNumericTextBox ID="RadNumericTextBox3" runat="server" />     
    <asp:Button ID="Button1" runat="server" Text="Result" OnClick="Button1_Click" /> 
</asp:Panel> 
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
        style="border: 0px;" /> 
</telerik:RadAjaxLoadingPanel> 
     

using System; 
public partial class Calculator : System.Web.UI.UserControl 
    protected void Button1_Click(object sender, EventArgs e) 
    { 
        System.Threading.Thread.Sleep(3000); 
        double value1 = (double)RadNumericTextBox1.Value; 
        double value2 = (double)RadNumericTextBox2.Value; 
        double result = value1 + value2; 
        RadNumericTextBox3.Value = result; 
    } 
 

I called the System.Threading.Thread.Sleep() method to simulate network latency. After creating this control, I was able to add any number of them to my content page and have them work perfectly.

The entire demo app which I created is located here. Feel free to download it and take a look.

I hope this answered your question. If you need further assistance, please don't hesitate to ask.

Sincerely,
Kevin Babcock
Tags
Ajax
Asked by
John Rogowski
Top achievements
Rank 1
Answers by
Kevin Babcock
Top achievements
Rank 1
Share this question
or