AjaxManager PartialAjax fire javascript responseEnd

5 posts, 0 answers
  1. Rich
    Rich avatar
    65 posts
    Member since:
    Jul 2012

    Posted 10 Sep 2009 Link to this post

    Hi there,

    I have an ajaxmanager on my page. Inside i created a setting for  asp:button's onclick event use a callback

    <

     

    telerik:AjaxSetting AjaxControlID="BtnEmailChart">

     

     

    <UpdatedControls>

     

     

    <telerik:AjaxUpdatedControl ControlID="RdMenuToolBarForChart" LoadingPanelID="RadAjaxLoadingPanel1" />

     

     

    </UpdatedControls>

     

     

    </telerik:AjaxSetting>

     


    Onclick of the button an email is sent. What i would like to do is once the callback is done i would like to open a radalert indicating the message was sent.

    I tried onresponseend for the ajaxmanager and notice that the ajax for the button does not fire this event. None of the partial ajaxification scenarios do... by design?

    Anyway is there a solution here? How can i fire some javascript when the response ends for the above callback? thanks!

  2. JT
    JT avatar
    49 posts
    Member since:
    Mar 2007

    Posted 11 Sep 2009 Link to this post

    I think Telerik might have accidentally broken this on a recent build. I just noticed OnRequestStart events aren't firing anymore either. Very uncool, as that's the only way to turn off AJAX for a file upload when the user clicks the Upload button.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rich
    Rich avatar
    65 posts
    Member since:
    Jul 2012

    Posted 14 Sep 2009 Link to this post

    Basically i'm trying to update a panel in a custom template inside a RadMenu.

    So the problem is the parent control is trying to update a child panel inside itself.. Apparently you cannot target anything but the parent to be updated.

    Although I can actually get this to work.. but adding more than one ajax setting for child controls inside the menu breaks it.

  5. JT
    JT avatar
    49 posts
    Member since:
    Mar 2007

    Posted 14 Sep 2009 Link to this post

    The issue I've run into is that OnRequestEnd and OnRequestStart only fire if the control that initiates postback is specified as an updated control. Try this:

    <Telerik:RadAjaxManager ID="ramMain" runat="server"
         <ClientEvents OnRequestStart="ramMain_RequestStart" /> 
         <AjaxSettings> 
              <telerik:AjaxSetting AjaxControlID="BtnEmailChart"
                   <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RdMenuToolBarForChart" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                   </UpdatedControls> 
              </telerik:AjaxSetting> 
              <telerik:AjaxSetting AjaxControlID="BtnEmailChart"
                   <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="BtnEmailChart" /> 
                   </UpdatedControls> 
              </telerik:AjaxSetting> 
         </AjaxSettings> 
    </Telerik:RadAjaxManager> 

  6. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 15 Sep 2009 Link to this post

    Hi,

    I followed your steps and prepared a sample project attached to this post. You can see that the OnRequestStart and the OnResponseEnd events are fired properly there. I also tried illustrating how you can show an alert when the ajax request is finished.

    I hope this helps.
    All the best,

    Iana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017