This is a migrated thread and some comments may be shown as answers.

Manager on master page and window on child page

2 Answers 259 Views
Window
This is a migrated thread and some comments may be shown as answers.
Zadjil
Top achievements
Rank 1
Zadjil asked on 22 Jun 2011, 03:32 PM
Hi,

I have a master page that has a RadWindowManager which contains some RadWindows that are common to all pages.
I am wanting to add specialized RadWindows on some of the child pages.

While I know that I can add these in the code behind or add them as separate RadWindows outside the Manager, I was wondering if I can add them declaratively into the RadWindowManager?
The behavior I'm looking for is similar to the use of the RadAjaxManagerProxy, and would look something like the code below.

Master Page:
<%@ Master Language="VB" CodeFile="Design.master.vb" Inherits="Design" %>
[...]
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
   <Windows
      <telerik:RadWindow ID="CommonWindow" runat="server" />
   </Windows>
</telerik:RadWindowManager>
[...]
Child Page:
<%@ Page Language="VB" MasterPageFile="Design.master" CodeFile="Main.aspx.vb" Inherits="Main"  %>
[...]
<telerik:RadWindowManager ID="RadWindowManager1Proxy" runat="server">
   <Windows>
      <telerik:RadWindow ID="PageSpecific" runat="server" />
   </Windows>
</telerik:RadWindowManager>
[...]


If I can't do this, is there any performance cost to not putting the RadWindows into the Manager?

Many thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 23 Jun 2011, 11:06 AM
Hello Zadjil,


  The RadWindowManager does not offer functionality similar to the AjaxManagerProxy. It is designed to be used as a singleton for calling the predefined dialogs (RadAlert, RadConfirm, RadPrompt) and to allow dynamic creation of RadWindows on the client.

RadWindows that you have declared in the markup can be left out of a RadWindowManager without any loss of functionality or performance penalty. The only change would be the way you will have to open these additional windows:
$find(PageSpecificWindow).show();
instead of
radopen(null, PageSpecificWindow)


If you want more RadWindows in the same manager you can add them directly in its declaration if you like. The cost of this is that this heavier markup will be loaded on every other content page as well.

  Another option (if you insist on always usign a RadWindowManager) is to use a second RadWindowManager on every content page and declare the specific Windows for this page in that manager. The tricky part is that in that scenario where more than one RadWindowManager is present on the page you would need to explicitly set which manager's radopen() function is called, as otherwise the first manager will be used. For example:
$find(RadWindowManagerMaster).radopen(null, "windowGlobalToTheWholeApplication");
  
$find(RadWindowManagerContent).radopen(null, "windowSpecificToThePage");

  Here which manager will have to be called explicitly depents on your pages and the order in which the controls are rendered. You can easily test this by adding some different settings for a given RadWindow in both and trying out the combinations to see which produces the expected behavior.

All the best,
Marin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Zadjil
Top achievements
Rank 1
answered on 23 Jun 2011, 11:12 AM
Thank you, Martin.
That clearly answers what I was wanting to know.
Tags
Window
Asked by
Zadjil
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Zadjil
Top achievements
Rank 1
Share this question
or