Hi, I'm trying to use RadAjaxManagerProxy within a control, following this: http://docs.telerik.com/devtools/aspnet-ajax/controls/ajax/radajaxmanagerproxy/overview
In the ascx, I have the proxy:
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnCal">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadScheduler1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadScheduler1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelCssClass="" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
In the code behind I have in the page load:
RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(RadAjaxManager1_AjaxRequest);
and:
protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
{
if (e.Argument == "Rebind")
{
RadScheduler1.Rebind();
}
}
which produces the errors:
Object reference not set to an instance of an object.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 21: RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
Line 22: manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(RadAjaxManager1_AjaxRequest);