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

RadWindow Standardization

1 Answer 49 Views
Window
This is a migrated thread and some comments may be shown as answers.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 17 May 2011, 01:53 PM
Hello,

I'm trying to make sense of the RadWindow/RadWindowManager relation.  I see that there can be many RadWindowManager controls defined in one page (unlike the RadScriptManager/ScriptManager which requires one implementation).  But I also see that we can implement the RadWindow either inside of the RadWindowManager or as a standalone control.

What is the advantages of using the RadWindowManager beside being able to apply settings defined on the manager to the window?  Is it better to keep the RadWindowManager outside of the master page and define it where it is needed, or is it better to keep a global radwindowmanager, and have radwindow as a standalone control?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 20 May 2011, 10:55 AM
Hi Brian,

Basically, the idea behind the RadWindowManager is to allow the users to create on the client multiple RadWindows with pre-defined properties, set in the manager. The manager's client-side API allows the developer to easily get a reference to such RadWindows and to operate with them.
There are a couple of things however, that should be kept in mind when using RadWindowManager.

1. In case you have multiple RadWindowManagers on the same page:

  •  All RadWindowManager's functions (radopen, radalert, radconfirm, radprompt, GetRadWindowManager, etc) are always using the first rendered RadWindowManager on the page.
  •  Every RadWindowManager "knows" only the RadWindows that are declared in its Windows collection.

This means that if you have a RadWindow2 as a standalone control OR declared in RadWindowManager2, and you use something like radopen(myUrl, "RadWindow2");, radopen will use RadWindowManager1 and will open a new RadWindow with the settings taken from RadWindowManager1. To avoid that problem, when you have multiple managers on a page, you need to get a reference to the correct RadWindowManager first and then call its methods.
e.g.
var manager = $find("<%= RadWindowManager2.ClientID %>");
manager.open(myUrl, "RadWindow2");  


2. Standalone RadWindow controls cannot be controlled by RadWindowManager - they are separate controls and are not affected by manager's settings.

I hope this helps.

Regards,
Georgi Tunev
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.

Tags
Window
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or