trying to use radopen but my window styles are being honored

2 posts, 0 answers
  1. Tim
    Tim avatar
    57 posts
    Member since:
    Apr 2011

    Posted 30 Sep 2011 Link to this post

    Hi

    I am trying to use radopen to present a RadWindow.

    I have looked at your example at :

    http://demos.telerik.com/aspnet-ajax/window/examples/radopen/defaultcs.aspx

    However when my window appears none of the settings in my RadWindow definition are being used.

    Here's my RadWindow defintion

     

     

    <telerik:RadWindow ID="CustomClientDataViewRadWindow" runat="server"

     

     

     

    Behaviors="Close,Maximize,Move,Resize"

     

     

     

    Height="600px"

     

     

     

    IconUrl="../Images/pencil.png"

     

     

     

    Modal="True"

     

     

     

    ReloadOnShow="True"

     

     

     

    Title="Device > Custom View"

     

     

     

    VisibleOnPageLoad="False"

     

     

     

    VisibleStatusbar="False"

     

     

     

    Width="985px">

     

     

     

    </telerik:RadWindow>

    This definition is contained inside a UserControl. 

    Here's my radopen statement

     

    radopen(

     

    "CustomDataViewPage.aspx?FolderID=" + FolderID + " &NodeType=2&ApplicationType=1", "CustomClientDataViewRadWindow");

    CustomDataViewPage.aspx is my own page with its own code behind.
    The radopen call is made inside a function in a separate .js file, rather then in a script block.

    Once again any help greatly appreciated.


    Do I need to invoke the radopen in the context of the RadWindowManager

     

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4613 posts

    Posted 03 Oct 2011 Link to this post

    Hello Tim,

    The radopen() function is a client-side method of the RadWindowManager. Therefore the CustomClientDataViewRadWindow RadWIndow needs to be in the Windows collection of a RadWindowManager.

    Please note that if no RadWindow with the required ID (the string passed as the second argument to the radopen() function) is found a generic one with the settings from the manager will be opened.

    Please also note that the RadWindowManager is designed to work as a singleton - i.e. only one instance per page. The radopen (and radalert(), radconfirm(), radprompt() functions as well) are "taken" by the first manager that is created on the page, so if more than one is present you should first get a reference to it (via the $find() method, which usually requires the ClientID of the control, therefore requires server code blocks and therefore is difficult to use in an external JS file), then call its own open() method, as shown in this help article. You can easily confirm if this is causing your issue by examining the source of the page and more precisely the $create() statement at the end.


    Greetings,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top