Sitefinity ASP.NET CMS
Skip Navigation LinksSupport / Knowledge Base / RadAjaxManager initialized too late in the page life cycle

RadAjaxManager initialized too late in the page life cycle

Problem
When RadAjaxManager control is used in a Sitefinity page, it is initialized too late in the page life cycle. Actually, AJAX Manager should be created in OnInit.

Workaround

1. Declare RadAjaxManager in the master page and not in the user control:
.master

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager> 
   
 

2. Get the "master" manager instance via GetCurrent method in the Page_Load method of the user control:
.ascx.cs

RadAjaxManager manager = RadAjaxManager.GetCurrent(this.Page);  
 

3. Add the AJAX settings programmatically:
.ascx.cs

manager.AjaxSettings.AddAjaxSetting(this.RadGrid1, this.RadGrid1, this.RadAjaxLoadingPanel1);   
 

Article Info

Article relates to 3.2 and above
Created by Penka Ivanova
Last modified by Rebecca
Related categories: Workarounds

About Telerik

Telerik, the publisher of Sitefinity CMS, is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting and .NET ORMTFSCode Analysis and Web Application Testing tools. Building on its solid expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Created with passion, Telerik products help thousands of developers every day to be more productive and deliver reliable applications under budget and on time. Read more about Telerik

Copyright © 2002-2010 Telerik. All rights reserved. Powered by Sitefinity