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

RadXMLPanel LoadingPanel not hiding

1 Answer 39 Views
XmlHttpPanel
This is a migrated thread and some comments may be shown as answers.
Andrew Bresko
Top achievements
Rank 1
Andrew Bresko asked on 24 Jun 2010, 12:47 AM
I have the following:

<telerik:RadXmlHttpPanel ID="RadXmlHttpPanelWOSummary" runat="server" LoadingPanelID="RadAjaxLoadingPanel1"
    Value="CACTU" OnServiceRequest="XmlHttpPanel_ServiceRequest" 
    RenderMode="Block">

When the service request fires off, the Loading Panel displays.  Unfortunately, it NEVER hides.  I have followed your demo to a T, what could I possibly be doing wrong?  Is there a way I can explicitly hide the loading panel for the XmlHttpPanel?  I know how to hide one explicitly but I can't get it to work in conjunction with the RadXmlHttpPanel.

Thanks,

Andy

1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 28 Jun 2010, 12:50 PM
Hello Andy,

I tested the following code, but everything seems to be working properly:

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title></title>
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
 
        <script type="text/javascript">
            function SetValue()
            {
                var panel = $find("<%=XmlPanel1.ClientID %>");
                panel.set_value("Some_Value");
            }
 
            function OnClientResponseEnding(panel, args)
            {
                //var loadingPanel = $find(panel.get_loadingPanelID());
                //loadingPanel.hide(panel.get_element().id);
            }
        </script>
 
    </telerik:RadScriptBlock>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
        </Scripts>
    </asp:ScriptManager>
    <input value="Set Value (callback)" onclick="SetValue(); return false;" type="button" />
    <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" MinDisplayTime="1000"
        Skin="Hay" Width="400" Height="500">
    </telerik:RadAjaxLoadingPanel>
    <div>
        <telerik:RadXmlHttpPanel ID="XmlPanel1" LoadingPanelID="LoadingPanel1" runat="server"
            OnServiceRequest="XmlPanel1_ServiceRequest" EnableClientScriptEvaluation="true"
            OnClientResponseEnding="OnClientResponseEnding" Width="200px" Height="200px">
        </telerik:RadXmlHttpPanel>
    </div>
    </form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class XmlPanel_Lifecycle : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
 
    protected void XmlPanel1_ServiceRequest(object sender, Telerik.Web.UI.RadXmlHttpPanelEventArgs e)
    {
        XmlPanel1.Controls.Add(new LiteralControl(DateTime.Now.ToString()));
    }
}

To explicitly hide the AjaxLoadingPanel shown over the XmlHttpPanel, please handle the responseEnding client-side event of the XmlHttpPanel, and invoke RadAjaxLoadingPanel.hide method. In the sample code above, you only need to uncomment both lines in OnClientResponseEnding method.

In case the problem persists, could you please send us a sample project (or sample code) that demonstrates the issue, and we will do our best to help you?

All the best,
Pero
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
XmlHttpPanel
Asked by
Andrew Bresko
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or