How to achieve ClientEvents-OnRequestStart for RadAjaxManagerProxy

7 posts, 1 answers
  1. bemara57
    bemara57 avatar
    57 posts
    Member since:
    Mar 2008

    Posted 23 Apr 2008 Link to this post

    I have a MasterPage with the RadAjaxManager, so in my sub-pages, I have a RadAjaxManagerProxy. But it doesn't seem there is ClientEvents-OnRequestStart for the proxy. I'm trying to do this in the proxy:


    Is there a way to achieve this?
  2. Answer
    Vladimir avatar
    115 posts
    Member since:
    Dec 2007

    Posted 26 Apr 2008 Link to this post

    You can access RadAjaxManager via GetCurrent(Page) static method and add desired client-side event directly to the manager. RadAjaxManagerProxy is just a storage for ajax settings.
  3. Ryan Means
    Ryan Means avatar
    32 posts
    Member since:
    Dec 2006

    Posted 28 Jan 2009 Link to this post

    It looks like you have to do this in the Page OnInit event.  I tried it in the Page Load event and it did not work.

    protected override void OnInit(EventArgs e)  
        RadAjaxManager.GetCurrent(this.Page).ClientEvents.OnRequestStart = "searchRequestStart";  
        RadAjaxManager.GetCurrent(this.Page).ClientEvents.OnResponseEnd = "searchRequestEnd";  
  4. Sebastian
    Sebastian avatar
    9934 posts

    Posted 28 Jan 2009 Link to this post

    Hi Ryan,

    Generally speaking, both client-side event can be attached either in the OnInit or OnLoad handler of the page. Can you please verify that you are using the latest release 2008.3.1314 of RadControls for ASP.NET AJAX in your project? If the problem persists, please paste your page definition in this thread in order to examine your complete code logic and research the matter further.

    Best regards,

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Valera
    Valera avatar
    7 posts
    Member since:
    Aug 2009

    Posted 18 Aug 2009 Link to this post

    What if I have this situation:

    Master Page - has AjaxManager along with onEventStart="AjaxStart" and onEventEnd="AjaxEnd" events.

    Content Page - has AjaxManagerProxy, I would like to have another set of onEventStart and onEventEnd events, but at the same time I don't want to overwrite nor replace original ones (from Master Page).

    How do I achieve this functionality?
  6. Dimo
    Dimo avatar
    8485 posts

    Posted 20 Aug 2009 Link to this post

    Hello Valerij,

    RadAjaxManagerProxy may look like a separate control, but it is not. It just passes some AjaxSettings to the main RadAjaxManager control. So there can't be separate event handlers for the proxy.

    What you can do is check the event arguments when the event is fired and depending on them, execute a specific part of the handler:

    Sincerely yours,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Roger
    Roger avatar
    183 posts
    Member since:
    Sep 2007

    Posted 26 Jul 2010 Link to this post

    I am using version 2010.1.415.35 but the reasoning still applies. The reason I am using this thread is that it came up first on Google so will be the one most watched and I had a similar problem to bemara57. I wanted to centre the loading image in the centre of the screen but I was using mast/content pages and a RadAjaxManagerProxy control on the content page (which doesn't have client events).

    The suggested method is to use (in the content page):

    Dim manager As RadAjaxManager = RadAjaxManager.GetCurrent(Page)
    manager.ClientEvents.OnRequestStart = "centerLoadingPanel"

    however I was getting page.init errors.

    So I used (in the content page, where RadAjaxMaster is the id of the RadAjaxManager in the master page):

    Dim ajaxmanager As RadAjaxManager = CType(Master.FindControl("RadAjaxMaster"), RadAjaxManager)
    ajaxmanager.ClientEvents.OnRequestStart = "centerLoadingPanel"

    and everything works fine. Hope this helps someone else.

Back to Top