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

Setting RadWindow's position from client side

6 Answers 911 Views
Window
This is a migrated thread and some comments may be shown as answers.
Quan Nguyen
Top achievements
Rank 1
Quan Nguyen asked on 31 Jan 2008, 09:59 AM
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?

6 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 31 Jan 2008, 03:47 PM
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
0
Quan Nguyen
Top achievements
Rank 1
answered on 31 Jan 2008, 05:07 PM
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".
0
George
Telerik team
answered on 01 Feb 2008, 03:17 PM
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
0
gonzalez
Top achievements
Rank 1
Veteran
answered on 26 Nov 2010, 07:33 PM
si tienes activa la propiedad modal = true no podras ejecutar el metodo move to
0
Allen
Top achievements
Rank 2
Iron
Veteran
answered on 29 Aug 2019, 02:49 PM
Roughly translated - If using a modal window (modal=true) then the moveTo method does not work;
0
Rumen
Telerik team
answered on 30 Aug 2019, 10:31 AM

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.
Tags
Window
Asked by
Quan Nguyen
Top achievements
Rank 1
Answers by
George
Telerik team
Quan Nguyen
Top achievements
Rank 1
gonzalez
Top achievements
Rank 1
Veteran
Allen
Top achievements
Rank 2
Iron
Veteran
Rumen
Telerik team
Share this question
or