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

[Solved] Updated Ajax Manager causes postback.

3 Answers 189 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 21 Apr 2008, 10:08 PM
Hello,

I've just updated my RadAjaxManager to the latest version and I also updated the RadAjaxLoadingPanels.  Unfortunatly, any change to any control now does a full page refresh.  I assign the AjaxSetting programatically.  Switching back to the pre-prometheus AJAX manager and loading panels works fine.  Below are code samples. Thanks!
ASPX
<telerik:RadAjaxManager ID="ramDashboard" runat="server">  
            <AjaxSettings>                 
            </AjaxSettings> 
</telerik:RadAjaxManager> 
 
<telerik:RadAjaxLoadingPanel ID="alpDashboard" Transparency="5" runat="server" Height="75px" 
    Width="75px">  
    <asp:Image ID="Image1" runat="server" AlternateText="Loading..." ImageUrl="~/RadControls/Ajax/Skins/Default/Loading.gif" /> 
</telerik:RadAjaxLoadingPanel> 
 
<telerik:RadAjaxLoadingPanel ID="alpDashboardSmall" Transparency="5" runat="server" Height="75px" 
    Width="75px">  
    <asp:Image ID="Image3" runat="server" AlternateText="Loading..." ImageUrl="~/RadControls/Ajax/Skins/Default/Loading7.gif" /> 
</telerik:RadAjaxLoadingPanel> 
C#
public void setupAjaxManager()  
    {  
 
        Control widgetStations = FindControlRecursive(rdzMain, "widgetStations");  
        Control rdzStations = FindControlRecursive(widgetStations, "rdzStations");  
        Control widgetAutoMode = rdzStations.FindControl("widgetAutoMode");  
        Control widgetUserMode = rdzStations.FindControl("widgetUserMode");  
        Control widgetOffMode = rdzStations.FindControl("widgetOffMode");  
        Control widgetFlow = FindControlRecursive(rdzMain, "widgetFlow");  
        Control widgetSetup = FindControlRecursive(rdzMain, "widgetSetup");  
        Control widgetDayTime = FindControlRecursive(rdzMain, "widgetDayTime");  
        Control widgetCustomPlants = FindControlRecursive(rdzMain, "widgetCustomPlants");  
        Control widgetAdvBtn = rdzStations.FindControl("btn_stns_settings_adv");  
        Control widgetBasicBtn = rdzStations.FindControl("btn_stns_settings_basic");  
                  
        //Edit Controller Top Button  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_top_icon, widgetAutoMode);  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_top_icon, widgetUserMode);  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_top_icon, widgetOffMode);  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_top_icon, widgetSetup);  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_top_icon, widgetDayTime);  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_top_icon, widgetFlow);  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_top_icon, widgetCustomPlants);  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_top_icon, pnlTopControl, alpDashboardSmall);  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_top_icon, pnlBottomControl, alpDashboardSmall);  
 
 
        //Edit Controller Bottom Button  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_icon, widgetAutoMode);  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_icon, widgetUserMode);  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_icon, widgetOffMode);  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_icon, widgetSetup);  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_icon, widgetDayTime);  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_icon, widgetFlow);  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_icon, widgetCustomPlants);          
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_icon, pnlTopControl, alpDashboardSmall);  
        ramDashboard.AjaxSettings.AddAjaxSetting(btn_edit_controller_icon, pnlBottomControl, alpDashboardSmall);  
//...AND SO ON...  


3 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 22 Apr 2008, 06:55 AM
Hi Ken,

Can you please share which event do you use to configure the AJAX Manager? Please, review this article which elaborates on the dynamic configuration requirements.

Greetings,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
David
Top achievements
Rank 1
answered on 22 Apr 2008, 03:49 PM
Konstantin,

I'm calling setupAjaxManager(), see below, when a docking zone's docks are dynamically created.  The article you provided pretty much mirrors how I am doing it...the only difference is the event that fires setupAjaxManager() which does indeed fire.  This method works with the pre-prometheus version. Simply replacing the existing code with the equivalent new code in the ASPX page will cause it to no longer function and post-back. 

Here is an example of the bubble event (fires when the docking zone is populated):

protected override bool OnBubbleEvent(object source, System.EventArgs args)  
    {  
 
        try 
        {  
            String testSource = source.GetType().ToString();  
 
            //prometheus dock  
            if ((source.GetType().ToString()) == "Telerik.Web.UI.RadDockZone")  
            {  
                setupAjaxManager();  
            }  
}   
catch (Exception ex)  
        {  
            return false;  
        }  


Thanks!
0
Konstantin Petkov
Telerik team
answered on 23 Apr 2008, 07:58 AM
Hello Ken,

Unfortunately we are not aware of a similar problem introduced with the official release. I will kindly ask you to submit a regular support ticket attaching a runnable sample, which was functioning properly prior to the official release, but performs postbacks only with the 2008.1.415 labeled RadControls for ASP.NET AJAX. We will debug the issue locally and get back to you with our findings.

Kind Regards,
Konstantin Petkov
the Telerik team

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