Client API - Initial Behaviors

2 posts, 0 answers
  1. Jason Heine
    Jason Heine avatar
    16 posts
    Member since:
    Apr 2010

    Posted 05 Nov 2010 Link to this post


    I am opening the rad window via radopen:

    No matter what setting I put in the window manager, it does not want to use those settings. Any thoughts on how I can open my rad window and use the settings via the window manager?

    I really need to set initial behaviors and other properties, but can't find it in the client side api documentation.

    function ShowAddForm() {
                var window = radopen("AddAction.aspx?CID=<%= HttpUtility.UrlEncode(Request["CID"]) %>", "AddActionDialog");
                window.setSize(800, 600);

                return false;
    function ShowAddForm() {
                var window = radopen("AddAction.aspx?CID=<%= HttpUtility.UrlEncode(Request["CID"]) %>", "AddActionDialog");
                window.setSize(800, 600);
                return false;

    I have my RadWindowManager:

    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
        EnableShadow="true" Behaviors="Close" KeepInScreenBounds="True"
        ReloadOnShow="True" ShowContentDuringLoad="False" VisibleStatusbar="False"
            <telerik:RadWindow ID="AddActionDialog" runat="server" Title="Add New Action" Height="800"
                Width="600" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true" />
  2. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 10 Nov 2010 Link to this post

    Hi Jason,

    The JavaScript code should work (I would only suggest to change the modal method to set_modal() to match the ASP.NET AJAX naming convention). As for opening a declared RadWindow and the properties that you have set in its declaration not being set, this can happen if you have more than 1 RadWindowManagers on the page.

    In such case, you need to take into consideration the following:

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

    This means that if you have a RadWindow2 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 %>");, "RadWindow2");

    Kind regards,
    Georgi Tunev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top