RadWindow Standardization

2 posts, 0 answers
  1. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 17 May 2011 Link to this post


    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?

  2. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 20 May 2011 Link to this post

    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.
    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.

    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.

Back to Top