Setting RadWindow's position from client side

7 posts, 0 answers
  1. Quan Nguyen
    Quan Nguyen avatar
    11 posts
    Member since:
    Apr 2006

    Posted 31 Jan 2008 Link to this post

    Hi,
    I have a header, a footer and a body area. In body area I have a splitter which contains a left pane, a resizable splitbar, and a right pane. The right pane is content area where the data is presenting and the left pane is for navigation. when an user want to edit an object, the object is opened in a radwindow. The problem is that I want to set the position and size of the rad window to fill the content area so that the user doesn't know that the object is opened in a radwindow.

    I'm able to set the height and width of the radwindow so it fits the content area from the client side, but i couldn't set the position of the radwindow at the same position.

    One last question, how can I remove the titlebar och the statusbar of the radwindow making it transparent so it fits it the scen above?

  2. George
    Admin
    George avatar
    298 posts

    Posted 31 Jan 2008 Link to this post

    Hi Quan Nguyen,

    I am not sure I understand you correctly but you want to overlap RadPane with RadWindow using exact match of their size and position? Does the window should have skin enabled?

    In order to obtain the pane's position you can put it in a DIV tag with style="position: absolute; left: 100px; top: 100px" and some id value. Then you will be able to specify your own coordinates and retrieve them by the style object in JavaScript as oDiv.style.left and oDiv.style.top where oDiv is reference to this DIV.

    You can disable the skin of the window when you set the property EnableEmbeddedSkins="false", this will switch off the using of embedded skins. In this way you will automatically lose the titlebar and the status bar skins as well. Here is a sample snippet how it could be done:

            <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableEmbeddedSkins="false"
            <Windows> 
             <telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true" NavigateUrl="http://www.google.com"
            </telerik:RadWindow> 
            </Windows> 
            </telerik:RadWindowManager> 


    Kind regards,
    George
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Quan Nguyen
    Quan Nguyen avatar
    11 posts
    Member since:
    Apr 2006

    Posted 31 Jan 2008 Link to this post

    Exactly, I want to overlap the RadPane with RadWindow, obtaining the position of the RadPane is not a problem, but I cannot call oWin.moveTo(pane.get_Width(), 40) to move the radwindow to its position. When calling moveTo(x, y) th browser throws javascript error "this_popupBehavior is null or not an object".
  4. George
    Admin
    George avatar
    298 posts

    Posted 01 Feb 2008 Link to this post

    Hello Quan Nguyen,

    Basically you should make sure that your window object is existing and you are referring to exactly the same object. Here is a short snippet how it could be used:

      var oWnd = radopen( "Dialog.aspx", null);       
      oWnd.moveTo("100px","100px");


    I have answered you already the rest in the support ticket you have sent.

    Sincerely yours,
    George
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. gonzalez
    gonzalez avatar
    5 posts
    Member since:
    Sep 2010

    Posted 26 Nov 2010 Link to this post

    si tienes activa la propiedad modal = true no podras ejecutar el metodo move to
  6. Allen
    Allen avatar
    82 posts
    Member since:
    Mar 2011

    Posted 29 Aug 2019 in reply to gonzalez Link to this post

    Roughly translated - If using a modal window (modal=true) then the moveTo method does not work;
  7. Rumen
    Admin
    Rumen avatar
    14324 posts

    Posted 30 Aug 2019 Link to this post

    Hi there,

    You can set the modality with oWnd.set_modal(true); as shown below:

    <asp:ScriptManager runat="server" ID="ScriptManager1"></asp:ScriptManager>
    content on the page
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager>
    <button onclick="OpenWindow();return false;">Open RadWindow</button>
    <script>
        function OpenWindow() {
            var oWnd = radopen("Dialog.aspx", null);
            oWnd.set_modal(true);
            oWnd.moveTo("100px", "100px");
        }
    </script>

    Hope this helps.

    Regards,
    Rumen
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top