This is a migrated thread and some comments may be shown as answers.
Is there a RadAjaxManagerProxy?
14 Answers 262 Views
This is a migrated thread and some comments may be shown as answers.
shaun
Top achievements
Rank 1
shaun asked on 03 May 2007, 08:02 AM

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?

14 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 03 May 2007, 08:24 AM
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
0
shaun
Top achievements
Rank 1
answered on 04 May 2007, 07:02 AM
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.
0
Vlad
Telerik team
answered on 04 May 2007, 08:34 AM
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
0
shaun
Top achievements
Rank 1
answered on 04 May 2007, 08:00 PM
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
0
Steve
Telerik team
answered on 07 May 2007, 10:48 AM
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
0
Vlad
Telerik team
answered on 07 May 2007, 01:40 PM
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
0
shaun
Top achievements
Rank 1
answered on 07 May 2007, 04:49 PM
Vlad -
  Thanks for the super quick turn around!  I'm sure your implementation is much cleaner since the actual RadAjaxManager can participate :)

-Shaun
0
shaun
Top achievements
Rank 1
answered on 08 May 2007, 08:03 AM
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.
0
Vlad
Telerik team
answered on 08 May 2007, 08:49 AM
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
0
Marvin
Top achievements
Rank 1
answered on 06 May 2008, 02:56 PM
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

0
Todd Anglin
Top achievements
Rank 2
answered on 07 May 2008, 04:30 AM
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
0
Mohan
Top achievements
Rank 1
answered on 19 Jan 2012, 05:16 PM
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
0
Maria Ilieva
Telerik team
answered on 23 Jan 2012, 11:58 AM
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
0
Nick
Top achievements
Rank 1
answered on 25 Jan 2012, 03:55 AM
Thank.
Asked by
shaun
Top achievements
Rank 1
Answers by
Vlad
Telerik team
shaun
Top achievements
Rank 1
Steve
Telerik team
Marvin
Top achievements
Rank 1
Todd Anglin
Top achievements
Rank 2
Mohan
Top achievements
Rank 1
Maria Ilieva
Telerik team
Nick
Top achievements
Rank 1
Share this question
or