Updating an AjaxPanel from JS called from RadWindow?

2 posts, 0 answers
  1. DH
    DH avatar
    11 posts
    Member since:
    Dec 2011

    Posted 24 Jul 2015 Link to this post

    I'm having some issues getting an AjaxPanel to update. 

    On my content page, I have 2 user controls wrapped in an AjaxPanel: 

    <telerik:RadAjaxPanel ID="AjaxPanel1" runat="server"  OnAjaxRequest="RadAjaxPanel1_AjaxRequest"  >
       <div class="row">
           <div>
               <div class="col-md-6">
                   <uc1:TView runat="server" ID="TView" />
               </div>
               <div class="col-md-6">
                     <uc1:ProControl runat="server" ID="ProcView" />
               </div>
           </div>
       </div>
        </telerik:RadAjaxPanel>

    In my user control, I have a link that opens a fairly simple RadWindow via JS

     

    <telerik:RadWindow ID="WinPView" runat="server" Width="700px"
        Height="732px" ReloadOnShow="true"
         OnClientClose="closeWithAlert"  CssClass="" skin="Sunset"
        Behaviors="Close" Modal="True" EnableViewState="true" VisibleTitlebar="false"
        VisibleStatusbar="false">
    </telerik:RadWindow>

    When the window is closing, I pass some data back to my content page JS asks the panel to update

     

    '// JS
     function invokeAjaxrequest() {
                    $find("<%= AjaxPanel1.ClientID%>").ajaxRequest();
                }
    '// Code Behind
     Protected Sub RadAjaxPanel1_AjaxRequest(sender As Object, e As AjaxRequestEventArgs)
                PView.UpdateData()
                TView.UpdateData()
            End If
        End Sub

     

    In that JS function I ask the AjaxPanel to update. It appears to only work sometimes. Suggestions to troubleshoot this? I seem to be able to hit the breakpoint so i know the JS request to update is hitting, however the UI is not refreshing, thus for some reason the ajaxpanel is not updating the content. Ive adjusted the maxqueue size as well. 

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 29 Jul 2015 Link to this post

    Hi Dan,

    The presented code looks absolutely correct to me and there is no obvious reason for the issue to appear, The strange thing is that the UserControls are not updating randomly and the issue appear from time to time. Can you please inspect the server response in the browser's console and see if any errors appear when the panel fails to update?

    Regards,
    Maria Ilieva
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top