This is a migrated thread and some comments may be shown as answers.

[Solved] RadAjaxManager, RadAjaxManagerProxy, MasterPages & UserControls

3 Answers 254 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Daron
Top achievements
Rank 1
Daron asked on 08 Feb 2008, 01:55 PM
Can someone from Telerik please, please, please, give a working example of using RadAjaxManager and RadAjaxManagerProxy in masterpages and usercontrols.

Please consider this the scenario:

1 MasterPage - contains RadAjaxManager and LoadingPanel
1 .aspx page (using MasterPage as template) with a RadGrid that needs to fire an ajaxified "RowClicked" event
1 usercontrol on the .aspx page that contains labels etc. to display details about row that was clicked.

I think this covers most of the scenarios and should give a good understanding of how to use these very confusing controls.

Cheers


3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 08 Feb 2008, 02:23 PM
Hi Daron,

There should be nothing confusing about these "very simple" controls :) We assume that you have the described scenario already working with standard postbacks. Then you have two options:
  • use RadAjaxManager only in the MasterPage. In this case, you need to locate the controls (RadGrid, Label) with the help of FindControl and add them programmatically to the AjaxSettings in MasterPage's Page_Load eventhandler. Take a look at these help articles for more info:
    • http://www.telerik.com/help/radcontrols/prometheus/ajxMasterPageUpdateEverywhere.html
    • http://www.telerik.com/help/radcontrols/prometheus/ajxLoadControlFromAnotherWebUserControlInDifferentMasterPageContentPlaceHolder.html
  • use RadAjaxManager in the MasterPage and AjaxManagerProxy in the content page. The AjaxManagerProxy plays the role of AjaxSettings container to ease you, so you do not have to use the above approach and avoid additional coding. Simply set the RadGrid as initiator and the Label as updated control in its AjaxSettings. If you want to ajaxify only the RowClick event of the grid, you should hook up to the client OnRowClick event and use the client API of the AjaxManager to initiate AjaxRequest().
Hope this helps.
Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Daron
Top achievements
Rank 1
answered on 11 Feb 2008, 10:11 AM
I still fail to see how the RadAjaxProxyManager comes into the picture - neither of the links you provided utilise it and from my numerous experiments I'm convinced it doesn't actually work.

I can already get the same results as the examples you provided. However they do not provide examples on how to call the AjaxRequest event of the RadAjaxManager in the masterpage. I have ditched the RadAjaxManagerProxy altogether (until you can prove it works) and I'm using the convulted method of delegates as kindly provided by one of your clients at:
http://www.telerik.com/community/forums/thread/b311D-ththc.aspx#371508

This should be added to the documentation as a working solution to the problem posted.

DT
0
Steve
Telerik team
answered on 12 Feb 2008, 04:55 PM
Hi Daron,

I've read carefully your initial request and following your requirements, I've created example based on them. Note that there is no need for RadAjaxManagerProxy in it, and I've used only the RadAjaxManager from the MasterPage. Please review it and let me know if this will work for you.
As mentioned before RadAjaxManagerProxy serves as container for the AjaxSettings and can be used merely for cases where INamingContainers are involved, so that you do not have to manually locate all controls. In cases where custom AjaxRequest() is needed, it would not do you any good.
We will update the Prometheus documentation appropriately for the Q3 SP2 release.

Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
Daron
Top achievements
Rank 1
Answers by
Steve
Telerik team
Daron
Top achievements
Rank 1
Share this question
or