Is there a RadAjaxManagerProxy?

15 posts, 0 answers
  1. shaun
    shaun avatar
    14 posts
    Member since:
    May 2007

    Posted 03 May 2007 Link to this post

    Since the most useful part of RadAjaxManager is the UI for defining AjaxSettings that go along with it, why not create something similar to ScriptManager and ScriptManagerProxy?  This way, individual controls could have a ScriptManagerProxy, where they can define their own internal settings and update controls and then the content page (or master page) could have the top level RadAjaxManager that would aggregate all the RadAjaxManagerProxy controls from all child controls and content pages.

    Thoughts?

  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 03 May 2007 Link to this post

    Hi shaun,

    Great suggestion! Indeed we have plans to add such proxy control to the "Prometheus" RadAjax.

    Kind regards,
    Vlad
    the telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. shaun
    shaun avatar
    14 posts
    Member since:
    May 2007

    Posted 04 May 2007 Link to this post

    Very cool... do you have an estimate of when this will be available?

    I thought I would just be able to create my own composit control (derived from RadAjaxManager) and then hand-off all of the AjaxSettings to the main RadAjaxManager... well, everything went fine, right up until AjaxSetting.SerializeToJavascript() is called.  The ResolveClientID() method of the RadAjaxManager (which is really RadAjaxControl.FindControlRecursive().ClientID) fails to find the control... which kind of makes sense, since it is in a user control that is on the page twice.  Although, I would actually expect to see it reference the wrong clientid.

    Oh well, I will wait for the official Proxy from you guys.
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 04 May 2007 Link to this post

    Hi shaun,

    We will do our best to provide the proxy control as soon as possible (probably after three or four weeks) and in the meantime you can use the UniqueID when ajaxifying controls in your case similar to this example:

    http://www.telerik.com/DEMOS/ASPNET/Prometheus/Ajax/Examples/Manager/CrossNamingContainersUpdates/DefaultCS.aspx



    Greetings,
    Vlad
    the telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. shaun
    shaun avatar
    14 posts
    Member since:
    May 2007

    Posted 04 May 2007 Link to this post

    Thanks for the tip...  I fixed my extension and have included it below for anyone else that wishes to use it.
    http://www.thirdzero.com/tel/TelerikExt.zip


    1. Download, extract, open in dev studio
    2. Build
    3. Copy TelerikExt.dll to the bin folder of your Web project
    4. Open windows explorer
    5. Find the dll (in the bin folder) and drag it to Microsoft Visual Studio, dropping it on the toolbox (in to the "RadControls 'Prometheus'" toolbox folder.
    6. Move your "RadAjaxManager" to the top level of your site (master page or main .aspx)
    7. Open any sub pages (content ASPX or user controls)
    8. From the toolbox, drop an instance of the RadAjaxManagerProxy on your page
    9. Configure it exactly as you would the normal RadAjaxManager

    At runtime, the RadAjaxManagerProxy will translate all local control IDs to UniqueIDs, then pass them off to the main RadAjaxManager, then disable/hide itself to ensure there is only one RadAjaxManager per page.

    -Shaun
  7. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 07 May 2007 Link to this post

    Hi Shaun,

    Thank you for sharing your code with the community, although we believe that this code will not cover all possible scenarios, but it is definitely a good starting point and great effort. We have updated your Telerik points as a token of gratitude.

    All the best,
    Steve
    the telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 07 May 2007 Link to this post

    Hi guys,

    I'm attaching a fresh copy of latest Telerik.Web.UI build where the proxy control can be found already.
    You can find attached also two small applications demonstrating UserControls and MasterPages scenarios.

    Kind regards,
    Vlad
    the telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  9. shaun
    shaun avatar
    14 posts
    Member since:
    May 2007

    Posted 07 May 2007 Link to this post

    Vlad -
      Thanks for the super quick turn around!  I'm sure your implementation is much cleaner since the actual RadAjaxManager can participate :)

    -Shaun
  10. shaun
    shaun avatar
    14 posts
    Member since:
    May 2007

    Posted 08 May 2007 Link to this post

    Vlad -
      The Proxy works great... but it seems to be missing the OnAjaxRequest property.  It should be easy to add, since the proxy's OnAjaxRequest handler would just be added to the main RadAjaxManager OnAjaxRequest event delegate...  I have a work around that I am using, but it would be nice to have this for the next beta release.
  11. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 08 May 2007 Link to this post

    Thanks Shaun,

    We will add such property for sure. Let me know if you have any other questions or suggestions.

    Best regards,
    Vlad
    the telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  12. Marvin
    Marvin avatar
    5 posts
    Member since:
    Sep 2012

    Posted 06 May 2008 Link to this post

    Hello,

    I'm wondering if the OnAjaxRequest property is added to the RadAjaxManagerProxy? 

    I'm implmenting the grid/window integration solution and tries to rebind the grid after updating with the 2008 Q1 asp ajax controls, but it seems like the OnAjaxRequest property is missing from the proxy.

    Thanks

    Marvin

  13. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 06 May 2008 Link to this post

    Marvin-

    The Proxy actually "rolls-up" all of its settings to the primary RadAjaxManager at runtime. That means there is still only one RadAjaxManager controlling page actions, and thus one Manager firing the client-side Ajax events.

    To handle the events, you must write some JavaScript that "routes" the ajax events from your UserControl through "special" client-side event handlers. For a full discussion of this topic, check out my latest blog post:

    http://telerikwatch.com/2008/05/optimization-tips-using.html

    Hope that helps!

    -Todd
  14. Mohan
    Mohan avatar
    15 posts
    Member since:
    Apr 2011

    Posted 19 Jan 2012 Link to this post

    Hey Todd,

    I am referring to one of your old Blog posts, but please direct me if things have changed since then.
    I am using Telerik Q2 2011 version, have an issue with webform & dynamically loaded controls using Telerik extensively within.

    A Stripped of code is also attached herewith, I would be rasing a support ticket with the details , but since I found your post relevant to what I am trying to do, I am posting it here as well.

    The Scenario is:-
    Have a HomeToPortal.aspx  Web page ( NO MASTER PAGE ) , having Tree view on the Left as Menu or navigation control to my new site, with MENU1, MENU2, MENU3 etc.. tree nodes.

    On each MENU Click, Ajaxified, I plan to load a user control ( SWMonitoringUS.ascX for example ) which I am having issues.

    The issue is when the UserControl is loaded, & selected index changed for a combobox within this control, 
    1. The Selected index changed event when Auto post back = true does not fire ( So I set it to false & trying the Ajaxified way..)
    2. In the Ajaxified way, the JS function in the HomeToPortal.aspx gets fired for the  OnClientSelectedIndexChanged event of the Combo box, & the RadAjaxManager1_AjaxRequest on the HomeToPortal.aspx.vb  gets the hook, instead  I am expecting or wanting RadAjaxManagerProxy_AjaxRequest(..) in the usercontrol to fire.

    I have been trying all sorts, hence you might see some unwanted or commented code... but the goal is 

    User controls code behind's to get their event handlers in a Ajaxified way rtaher than percolating from the parent page who is loading the usercontrol dynamically.

    I will attach  a stripped of code I am trying to work around with session with a support ticket, the work around is what I want to avoid, and have a cleaner solution.

     

    Another minor issue is I can Navigate thro' the Menu Clicks in DEBUG Mode ( but NOT in Release mode ...) some .js issue for debug & non- debug JS..?

    How can I do this...

    Please Help

    ~Mohan
  15. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 23 Jan 2012 Link to this post

    Hello Mohan,

    Note that the Proxy does not provide client-side functionality as the Manager does. There is no client-side object as well as functions like ajaxRequest/ajaxRequestWithTarget and client-side events. Instead, one can get the Manager instance through the GetCurrent static method similar to the ASP:ScriptManager control and call the master manager client-side methods if necessary.
    In case you need to handle the master manager events in the user control or content page, you can attach event handlers to the manager as follows:
    protected void Page_Load(object sender, EventArgs e)
    {
        RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
        manager.ClientEvents.OnRequestStart = "onRequestStart";
        manager.ClientEvents.OnResponseEnd = "onResponseEnd";
        manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(manager_AjaxRequest);
    }
    protected void manager_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
    {
        //handle the manager AjaxRequest event here
    }

    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
  16. Nick
    Nick avatar
    2 posts
    Member since:
    Dec 2011

    Posted 24 Jan 2012 Link to this post

    Thank.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017