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

RadWindow Position on Open

2 Answers 173 Views
Window
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 18 Dec 2014, 09:09 PM
Hi Telerik, 

I have a page with 3 RadGrids. Each row contains information about an order and has a LinkButton.
Once you click on the LinkButton, some code behind gives parameters and opens a RadWindow from the RadWindowManager.

It might not be the perfect way to do it but I did need to access certain values with code behind.

The problem is that when I scroll down on the list, the RadWindow opens at the top of the page (at the initial scroll position) and since I am using RadAjaxManager, the page does not postback (which is what I want). 

So if I scroll too far, I can't see the RadWindow displayed. I need to have the RadWindow opened in the middle of the current position of the screen.

Thanks !

2 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 19 Dec 2014, 02:37 PM

Hi Mark,

At this point what I can suggest is examining the following thread on the two reasons for similar behavior and their fixes: http://www.telerik.com/forums/radwindow-moves-by-itself-after-opening.

The other idea I can offer is using the OnClientShow event to call the center() method of the RadWindow: http://www.telerik.com/help/aspnet-ajax/window-client-side-events-onclientshow.html. You can also try adding a small timeout around the center() call to see if this helps.


Regards,

Marin Bratanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Mark
Top achievements
Rank 1
answered on 19 Dec 2014, 07:35 PM
Hi Marin, thanks for the reply, 

I'm afraid it does not work. I first tried the OnClientShow, window.center(). I verified that the window isnt null and all by using alerts but it still shows up on top. 

After, I tried the other solutions.Since I am not using anchors, the fix by putting a Javascript on anchors did not work.
I also tried to put the focus inside the RadWindow and on the GridRow, without success.

I found what I wanted to achieve through 'KeepInScreenBounds' which worked... well, I guess I should read the properties a bit more
Tags
Window
Asked by
Mark
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Mark
Top achievements
Rank 1
Share this question
or