Telerik

Knowledge Base

Home/Web Content Management/Developer Network/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

Powered by Sitefinity ASP.NET CMS

Contact Us | Site Feedback | Terms of Use | Privacy Policy
Copyright © 2002-2010 Telerik. All rights reserved.