I have a MngrForm (.aspx) which happily loads uctls, from Radmenu, one of which is a tabbed uctl,..no problem,..this loads different UCtls into each tab on page load. No Problem.
I then use AjaxifySelf to ajaxify the grids in each of these UCtls loaded into the Tabbed UCtl. eg.
private void AjaxifySelf() {
RadAjaxManager ajaxManager = (RadAjaxManager)Page.FindControl("RadAjaxManager1");
ajaxManager.AjaxSettings.AddAjaxSetting(
this.FindControl("grvUserLogs"), this);
}
The result,...(when i run it) having inserted a row into the grid,...It Fires the LoadUserCtl on the BaseMain MngrForm,
which then tries to load the Uctl (which's grid is supposed to update, ) into the ContentPane of the Manager form, ..(It currently holds the Tabbed UCtl and should continue to do so.)
?? How / What do I set/do (on Ajax Mngr?) to prevent this, and just refresh my grid in the UCtl loaded into the Tab of the TabbedUctl without trying to get the Mngr to load it in place of the TabbedUctl????
STUMPED !! help
TIA
Neal
ie Mngr Form ->TabbedUCtl -->UCtl(+Grid,ajaxified dynamically)
and fires on Mngr to Load UCtl(Grid) to load/replace Tabbed UCtl.
The Mngr form has RadAjaxNManager included in HTML
aspx is as follows
<
body>
<form id="form1" runat="server">
<div id="FormDiv" style="width:100%; height:100%; border:solid ,1,gray">
<radA:RadAjaxManager ID="RadAjaxManager1" runat="server" >
<AjaxSettings>
<radA:AjaxSetting AjaxControlID="RadMenu1">
<UpdatedControls>
<radA:AjaxUpdatedControl ControlID="TopContentPanel" />
</UpdatedControls>
</radA:AjaxSetting>
<radA:AjaxSetting AjaxControlID="Radmenu2">
<UpdatedControls>
<radA:AjaxUpdatedControl ControlID="BottomContentPanel" />
</UpdatedControls>
</radA:AjaxSetting>
</AjaxSettings>
</radA:RadAjaxManager>
<asp:Panel
ID="TopNavPanel"
runat="server"
CssClass="TopNavPanel"
ScrollBars="Auto">
<radp:RadPanelbar ID="RadPanelbar1" runat="server" Width="190px"
Skin="Outlook" height="100%" >
<Items>
<radp:RadPanelItem Text="DM Admin" runat="server"
Expanded="true" Width="100%" BorderStyle="none">
<Items>
<radp:RadPanelItem runat="server" >
<ItemTemplate>
<radm:RadMenu ID="RadMenu1"
runat="server"
Flow="Vertical" Width="100%" Height="100%"
>
<Items>
<radm:RadMenuItem ID="TabbedUCtl"
runat="server"
BackColor="#404040" ForeColor="Silver"
Text="TabbedUCtl"
Width="100%" >
<GroupSettings ExpandDirection="Down"
Width="90px" />
</radm:RadMenuItem>
the CodeBehind is basic,..uses properties for SelectedUCtl as per most of the Telerik Examples..Control Load ,CtlReload and
RadAjaxManager1_ResolveUpdatedControls
The menu items click load the required userctl into the required ContentPane via the ReloadSelectedUctl property and the ReloadUserCtl() function.
protected void Page_Load(object sender, EventArgs e)
{
//Recreacte the user control for each page-lifecycle since we are adding it dynamically to the page
LoadUserControl(
this.selectedUC);
}
public void LoadUserControl(string userControl)
{
//Load user control onto page
Control selectedUserControl = Page.LoadControl(userControl);
//Generate an Unique ID based the control path
string uniqueID = this.selectedUC.Split('.')[0];
uniqueID = uniqueID.Replace(
"/", "").Replace("~", "");
selectedUserControl.ID = uniqueID;
//Load control into Required Panel
//...and prevent controls from being loaded twice..weird error,..??
if (TopContentPanel.FindControl(selectedUserControl.ID) == null)
{
TopContentPanel.Controls.Add(selectedUserControl);
}
}
public void ReloadUserControl()
{
//Loads the UCtl from the Property,...usually set from the UCtl..hence Public property
TopContentPanel.Controls.Clear();
LoadUserControl(
this.selectedUC);
}