Backend Page From Custom Module and AJAX
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="True"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="ProductionsModuleItemsMaster"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="ProductionsModuleItemsMaster" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManager><telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1"></telerik:RadAjaxLoadingPanel>
I added the above code to a user control auto-generated by the thunder wizard for adding a custom content type to a custom module; ModuleProject/Web/UI/<ContentType>sDetails.ascx
The RadGrid "ProductionsModuleItemsMaster" is not ajax-ified yet I enabled viewstate from backend pages and checked the box for including a script manager; the page does a full postback when interacting with the RadGrid, ProductionsModuleItemsMaster.
I then tried to programmatically attach the ajax setting to a standard button and it spit out something about a null value (the commented out line didnt work), so i manually created the ajax setting and it didnt encounter an error but the button is not ajax-ified:
protected override void OnInit(EventArgs e) base.OnInit(e); var setting = new AjaxSetting(); AjaxUpdatedControl target = new AjaxUpdatedControl(Button1.ID, RadAjaxLoadingPanel1.ID); setting.UpdatedControls.Add(target); setting.AjaxControlID = Button1.ID; RadAjaxManager1.AjaxSettings.Add(setting); //RadAjaxManager1.AjaxSettings.AddAjaxSetting(Button1, Button1, RadAjaxLoadingPanel1);Without going into details, I resolved the issue by using this instead of radajaxmanger:
public class CustomRadAjaxManager : RadAjaxManager
protected override void OnInit(EventArgs e)
this.Page.InitComplete += new EventHandler(Page_InitComplete);
void Page_InitComplete(object sender, EventArgs e)
base.OnInit(e);
Also, you'll need to set the enclosing div tag of the RadGrid to runat="server"