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

Centre a radWindow to the browser

4 Answers 117 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Paul Gallen
Top achievements
Rank 1
Paul Gallen asked on 10 Sep 2008, 08:28 AM

Hi,

I have 3 radPanes (with RadSplitters) each with their ContentURL set to 3 different web pages. When I show a modal radWindow in any of the three panes, the window is centred to the window. My requirements are to centre these radWindows to the browser not to the individual web pages. Is this achievable??

I have tried using set_openerElement, but to no avail

 

function openWin(aspxname,winName) {

                    var oWnd = radopen(aspxname, winName);

                    oWnd.setSize(650, 500);

 

                    oWnd.set_openerElementID(oWnd.BrowserWindow.parent.ID)

                  

                    oWnd.add_close(OnClientClose);

                }

 

Thanks

 

P

4 Answers, 1 is accepted

Sort by
0
Paul Gallen
Top achievements
Rank 1
answered on 10 Sep 2008, 04:12 PM
Sorry to trouble you guys, but is there a solution for this problem


K
0
Georgi Tunev
Telerik team
answered on 11 Sep 2008, 11:05 AM
Hello Paul,

RadWindows exist only on the page where they were created and you cannot directly center them (by using the client-side center() method) in your scenario.

What I can suggest in your case is:
  1. Open the RadWindows on the topmost page (where your splitter is), e.g. have the RadWindowManager /RadWindows declared there and access them from the content pages.
    OR
  2. To implement your custom logic that would calculate the position of the window against the viewport. Then you can use RadWindow's client-side API and move the window to the desired position by using the moveTo() method.


Sincerely yours,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Paul Gallen
Top achievements
Rank 1
answered on 11 Sep 2008, 02:46 PM

Thanks Georgi .

May I request this feature in future versions of the Telerik control?


Best

P

0
Georgi Tunev
Telerik team
answered on 12 Sep 2008, 12:46 PM
Hi Paul,

I am afraid this is not possible to implement in a property because such feature would not be able to provide consistent result. For example if the IFRAME in which the RadWindow resides, does not occupy the center of the viewport, you will not be able to show the window properly - it can exist in the page in which it is created only.


All the best,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Paul Gallen
Top achievements
Rank 1
Answers by
Paul Gallen
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or