Loading panel doesn't show.

2 posts, 0 answers
  1. Mike
    Mike avatar
    14 posts
    Member since:
    Nov 2005

    Posted 05 Mar 2010 Link to this post

    Hi there,

    I am trying to use the method to explicitly show/hide the loading panel. My code is:

    <

     

    telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

     

     

    <AjaxSettings>

     

     

    <telerik:AjaxSetting AjaxControlID="btnImport">

     

     

    <UpdatedControls>

     

     

    <telerik:AjaxUpdatedControl ControlID="Panel5" LoadingPanelID="LoadingPanel1" />

     

     

    </UpdatedControls>

     

     

    </telerik:AjaxSetting>

     

     

    </AjaxSettings>

     

     

    <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />

     

     

    </telerik:RadAjaxManager>

     

     

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"

     

     

    Skin="Vista">

     

     

    </telerik:RadAjaxLoadingPanel>

     

     

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

     

     

    <script type="text/javascript">

     

     

    var currentLoadingPanel = null;

     

     

    var currentUpdatedControl = null;

     

     

    function RequestStart(sender, args) {

     

    alert(

    "Should Load");

     

    currentLoadingPanel = $find(

    "<%= RadAjaxLoadingPanel1.ClientID %>");

     

     

    if (args.get_eventTarget() == "<%= btnImport.UniqueID %>") {

     

    currentUpdatedControl =

    "<%= Panel5.ClientID %>";

     

    }

     

     

     

     

    //show the loading panel over the updated control

     

    currentLoadingPanel.show(currentUpdatedControl);

    }

     

    function ResponseEnd() {

     

     

    //hide the loading panel and clean up the global variables

     

     

    if (currentLoadingPanel != null)

     

    currentLoadingPanel.hide(currentUpdatedControl);

    currentUpdatedControl =

    null;

     

    currentLoadingPanel =

    null;

     

    }

     

    </script>

     

     

    </telerik:RadCodeBlock>

    And I try and call it by:

     

    RadAjaxManager1.ResponseScripts.Add(

    "RequestStart();");

    But i can't get it to show.
    Can someone help figure out what Im doing wrong?

    Thanks

     

  2. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 05 Mar 2010 Link to this post

    I noticed that you set the LoadingPanelID for the Panel5 ajax setting to LoadingPanel1, instead of RadAjaxLoadingPanel1. Perhaps that is the issue.

    Also, if you are setting that setting there, I don't see why you would need to set it explicitly when you aren't changing the target element to show the LoadingPanel on.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top