I am at a total loss, no matter what I do, one of these two scenarios will throw a Sys is undefined error while utilized the RadAjaxManager:
My two scenarios, what they have in common:
I have a Master Page, on that Master Page I have a RadAjaxManager.
Scenario 1: I have a content page where User Controls are Dynamically Added to the Page and inside of the UserControls I reference the SharedAjaxManager and AddAjaxSettings for controls within my custom USer Controls
Scenario 2: I have a simple content page with Telerik Controls on It.
No matter how I define the RadAjaxManager it will ALWAYS fail one of these two scenarios when i try to ajaxify controls
I tried Defining it in the 3 following ways (2 ways are Programmatically in the Master Page, 1 way is By putting it in the MasterPage Markup)
I also tried defining by:
And by:
And in each case where I ajaxify Controls I do this: (i tried referencing it through my own way and by RadAjaxManager.GetCurrent(Page) //I also tried using RadAjaxManagerProxy and setting it in the aspx page, but it still throws the same error
But the problem is.... My User Control way works fine and my controls are ajaxified, but the simpler of the two ways, on just the content page.. it will throw the sys is undefined error....
Why will it only work in one of the two instances?
Thanks,
My two scenarios, what they have in common:
I have a Master Page, on that Master Page I have a RadAjaxManager.
Scenario 1: I have a content page where User Controls are Dynamically Added to the Page and inside of the UserControls I reference the SharedAjaxManager and AddAjaxSettings for controls within my custom USer Controls
Scenario 2: I have a simple content page with Telerik Controls on It.
No matter how I define the RadAjaxManager it will ALWAYS fail one of these two scenarios when i try to ajaxify controls
I tried Defining it in the 3 following ways (2 ways are Programmatically in the Master Page, 1 way is By putting it in the MasterPage Markup)
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (MasterAjaxManager == null)
{
Telerik.Web.UI.RadAjaxManager SharedAjaxManager = new Telerik.Web.UI.RadAjaxManager();
SharedAjaxManager.ID = "SharedAjaxManager";
SharedAjaxManager.DefaultLoadingPanelID = RALP.UniqueID;
form1.Controls.Add(SharedAjaxManager);
}
public Telerik.Web.UI.RadAjaxManager MasterAjaxManager
{
get { return (Telerik.Web.UI.RadAjaxManager)this.form1.FindControl("SharedAjaxManager"); }
}
}
I also tried defining by:
protected void Page_Init(object sender, EventArgs e)
{
Telerik.Web.UI.RadAjaxManager SharedAjaxManager = new Telerik.Web.UI.RadAjaxManager();
SharedAjaxManager.ID = "SharedAjaxManager";
SharedAjaxManager.DefaultLoadingPanelID = RALP.UniqueID;
this.Page.Form.Controls.Add(SharedAjaxManager);
}
public Telerik.Web.UI.RadAjaxManager MasterAjaxManager
{
get { return Telerik.Web.UI.RadAjaxManager.GetCurrent(Page); }
}
And by:
<
telerik:RadAjaxManager
ID
=
"SharedAjaxManager"
runat
=
"server"
DefaultLoadingPanelID
=
"RALP"
>
</
telerik:RadAjaxManager
>
public Telerik.Web.UI.RadAjaxManager MasterAjaxManager
{
get { return SharedAjaxManager; }
}
And in each case where I ajaxify Controls I do this: (i tried referencing it through my own way and by RadAjaxManager.GetCurrent(Page) //I also tried using RadAjaxManagerProxy and setting it in the aspx page, but it still throws the same error
protected
void
Page_Load(
object
sender, EventArgs e)
{
RegisterAjaxControls();
}
//end of PageLoad
protected
void
RegisterAjaxControls()
{
//Needed to ajaxify this control
RadAjaxManager manager = SharedAjaxManager;
// RadAjaxManager.GetCurrent(Page);
manager.AjaxSettings.AddAjaxSetting(btnCreateUser, panelEditUserContent);
manager.AjaxSettings.AddAjaxSetting(cblCompanyFilter, panelEditUserContent);
manager.AjaxSettings.AddAjaxSetting(rgUsers, panelEditUserContent);
}
But the problem is.... My User Control way works fine and my controls are ajaxified, but the simpler of the two ways, on just the content page.. it will throw the sys is undefined error....
Why will it only work in one of the two instances?
Thanks,