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

Content missing after RadAjaxLoadingPanel

1 Answer 26 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 11 Sep 2012, 10:20 AM

I have two standard USB panels when I press the button I need to process fields on panel one, then hide panel one and display panel two.  However when I press the button, the loading panel displays and the code behind fires... but once it is complete and the loading panel is hidden again the next panel is not shown.  I have stripped the code down in another temporary file to remove all style sheets, external scripts etc etc and the problem still remains...

I simply can't see where I'm being stupid, please help :)

Partial Class matt_test
    Inherits System.Web.UI.Page
 
    Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
        Panel1.Visible = False
        pnl_test.Visible = True
        System.Threading.Thread.Sleep(2000)
    End Sub
End Class

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="matt-test.aspx.vb" Inherits="matt_test" %>
 
<%@ 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 runat="server">
 
</head>
 
  
 
<body>
 
<form id="form1" runat="server">
 
<asp:ScriptManager ID="ScriptManager1" runat="server" SupportsPartialRendering="True" />
 
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 
 <script type="text/javascript">
 
  
 
var currentLoadingPanel = null;
 
var currentUpdatedControl = null;
 
  
 
function RequestStart(sender, args) {
 
  
 
currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID%>");
 
  
 
if (args.get_eventTarget() == "<%= Button1.UniqueID %>") {
 
currentUpdatedControl = "<%= Panel1.ClientID %>";
 
currentLoadingPanel.show(currentUpdatedControl);
 
}
 
  
 
}
 
  
 
function ResponseEnd() {
 
 
 
if (currentLoadingPanel != null) {
 
 currentLoadingPanel.hide(currentUpdatedControl);
 
}
 
currentUpdatedControl = null;
 
currentLoadingPanel = null;
 
}
 
  
 
</script>
 
  
 
</telerik:RadCodeBlock>
 
  
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
 
  
 
<AjaxSettings>
 
  
 
<telerik:AjaxSetting AjaxControlID="Button1">
 
  
 
<UpdatedControls>
 
  
 
<telerik:AjaxUpdatedControl ControlID="Panel1" />
 
 
 
</UpdatedControls>
 
  
 
</telerik:AjaxSetting>
 
  
 
</AjaxSettings>
 
  
 
<ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
 
  
 
</telerik:RadAjaxManager>
 
  
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" BackgroundPosition="Center" EnableSkinTransparency="true" Visible="true" />
 
  
 
<div id="frame_mobilecontent">
 
 
 
<asp:Panel ID="Panel1" runat="server" class="RegInputWrapper">
 
This<br />
 
Is<br />
 
A<br />
 
Test<br />
 
Panel<br />
 
</asp:Panel>
 
  
 
<asp:Panel runat="server" ID="pnl_test" style="background-color:Red;width:300px;height:600px;" visible="false">
 
This<br />
 
Is<br />
 
A<br />
 
Test<br />
 
Panel 2<br />
 
</asp:Panel>
 
  
 
<asp:Button ID="Button1" runat="server" Text="Button" />
 
  
 
</div>
 
  
 
</form>
 
  
 
</body>
 
  
 
</html>

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 13 Sep 2012, 02:02 PM
Hello Matt,

Note that you could not add control which is initially invisible on the page, to the RadAjaxManager settings. The initiator or the updated control should be always placed in a visible container so that the manager can locate it when necessary.
See the help topic below for more information on this matter:

http://www.telerik.com/help/aspnet-ajax/ajax-tips-and-tricks.html

I hope this helps.

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.
Tags
Ajax
Asked by
Matt
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or