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

BUG: RadAjaxManager - Property Builder & Web Content Forms

7 Answers 62 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Will
Top achievements
Rank 1
Will asked on 05 Oct 2009, 06:28 PM
The Property Builder control panel doesn't list the controls on the master page, but you can manually make AjaxSetting entries for those controls.  However, if you do make those entries and open the control panel to add additional entries, the manual entries get erased.  Also, the Property Builder control panel doesn't show list the objects in different <asp:Content> controls of that same web content form.  They can be entered manually as well, but the same issue exists.  The RadAjaxManager Property Builder needs to list all objects on the current web form/master page, as well as all of the parent master pages.

7 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 08 Oct 2009, 07:21 AM
Hello Bill,

Can you please verify that you are using the latest version 2009.2.826 of RadControls for ASP.NET AJAX in your project along with VS 2008 SP1? There was a similar issue reported before that should be addressed in the latest SP of VS 2008.
 
Greetings,
Sebastian
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.
0
Will
Top achievements
Rank 1
answered on 08 Oct 2009, 11:57 PM
Hey Sebastian,

I took a look at the issue you listed, but I think that that is a slightly different issue, though I could be wrong.  What I am referring to is that in a child content form I can manually referrence controls in the master page to trigger (AjaxSetting elements) the update of controls (AjaxUpdatedControl elements) on the current content form, but those master page controls do not appear in the design-time property builder.  It looks like the property builder is not iterating through the master-page of the current content form, nor it's parents.

I know that this worked a couple years ago when I first used the control, but it appears that it is not working now.  I've found a temporary work around that I can use by creating a second unnamed (no ID) RadAjaxManagerProxy control on the same page where I place the manually entries. For example:

<telerik:RadAjaxManagerProxy runat="server">  
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="EmployerSelectionGoButton">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="PagePanel" LoadingPanelID="IndicatorLoaderLoadingPanel" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 
 
<telerik:RadAjaxManagerProxy ID="LocalRadAjaxManagerProxy" runat="server">  
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="UpdateButton">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="PagePanel" LoadingPanelID="IndicatorLoaderLoadingPanel" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 


The EmployerSelectionGoButton is on the top most master page (the master to the master of the web content form), while the PagePanel and UpdateButton controls are on the web content form.

Thanks,
Bill
0
Martin
Telerik team
answered on 14 Oct 2009, 12:16 PM
Hello Bill,

I am attaching a sample project demonstrating how to AJAX-ify controls in a master and a content page using manual settings of a RadAjaxManagerProxy control. As you can see there is no need to add a second RadAjaxManagerProxy on the same page.
You are correct that the design time property builder does not include any controls placed in a master page or a content page of the current page. The reason is that these controls are created at run time and the property builder has no way to know what to look for.
As to "I know that this worked a couple years ago when I first used the control, but it appears that it is not working now." - I would like to know the version you used.

Regards,
Martin
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.
0
Will
Top achievements
Rank 1
answered on 14 Oct 2009, 10:01 PM
Hey Martin,

I understand why there are problems with the Property Builder, which is why I came up with the work-around.  Your example only covers half of the issue though.  There is no problem AJAXifying the controls on a master page that are triggered by an event on the same master page, or AJAXifiying controls on a web content form page that are triggered by an event on the same web content form page.  We are AJAXifying controls on both the master page and the web content form page that are triggered by an event on the master page, an event on the web content form, or something in the code behind that requires updates to any combination of master pages and web content forms.

By adding the second RadAjaxManagerProxy to the web content form, I can manually add a trigger that originates from the master page to update the web content form.  It works well, but it must be created manually.  Due to bugs in Visual Studio the Properties window for controls doesn't always display properly, which can make it rather difficult to work with.

Code behind updates are a bit trickier as they can only be accomplished via <asp:UpdatePanel> controls, which don't play well with the RadAjaxManager or RadAjaxManagerProxy controls.  If one of those controls triggers and update of an <asp:UpdatePanel> control and you happen to do a code behind .Update() to the <asp:UpdatePanel> control as well, the <asp:UpdatePanel> is rendered with no contents.  So, I have to ensure that both never happen by controlling the work flow of the page.

If it is possible to trigger the update of an AjaxUpdatedControl of a RadAjaxManager or RadAjaxManagerProxy control from the code behind, that would be great.  I know that it wouldn't be possible to trigger the loading panel, which is fine, but being able to update AJAXified controls from the code behind would eliminate the need for <asp:UpdatePanel> controls.

Thanks,
Bill
0
Martin
Telerik team
answered on 19 Oct 2009, 03:53 PM
Hello Bill,

I assume that you have tried the sample project from my post. The MasterPage.master page contains a button named MasterButton that is AJAX-ified through the RadAjaxManegerProxy object located in the MasterPage2.master page (MasterPage2.master is a content page of the MasterPage.master page). This button updates labels in all 3 pages. So I still do not understand why you would need this: "By adding the second RadAjaxManagerProxy to the web content form, I can manually add a trigger that originates from the master page to update the web content form."

As to "If it is possible to trigger the update of an AjaxUpdatedControl of a RadAjaxManager or RadAjaxManagerProxy control from the code behind, that would be great." I am afraid that such functionality is not supported by the RadAjaxManager control. As a workaround you can use RadAjaxPanels as described here or standard MS UpdatePanels.

I hope this helps,
Martin
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.
0
Will
Top achievements
Rank 1
answered on 19 Oct 2009, 04:20 PM
Hey Martin,

Yes, I did look at your example, but your method is many times more complicated than what I have done.  To implement your code properly, I would need to create additional interfaces, implement them on web content forms, and then test for them in the master pages.  Plus, since this is all done in the code behind instead of on the ASPX pages, the code needs to be duplicated on all affected pages (including master pages), which require a recompile of the application.

Since there is no way to trigger an update in the code behind, I'll just continue with what I've done with asp:UpdatePanels.  I tried using RadAjaxPanels back in June, but they didn't work correctly under .NET 3.5 and caused the entire site to fail.

Thanks,
Bill
0
Will
Top achievements
Rank 1
answered on 19 Oct 2009, 05:10 PM
In looking at the RadAjaxPanel again, I remember one of the issues.  To force an update of a panel from the code behind, you need to add a line like:

RadAjaxPanel1.ResponseScripts.Add(String.Format("$find('{0}').ajaxRequest();", RadAjaxPanel2.ClientID));

And you need to ensure that that same panel is no added multiple times, as opposed to just doing a .Update() on an asp:UpdatePanel which handles this for you.
Tags
Ajax
Asked by
Will
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Will
Top achievements
Rank 1
Martin
Telerik team
Share this question
or