RadWindow Position on Open

3 posts, 0 answers
  1. Mark
    Mark avatar
    23 posts
    Member since:
    Sep 2014

    Posted 18 Dec 2014 Link to this post

    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. Marin Bratanov
    Marin Bratanov avatar
    3558 posts

    Posted 19 Dec 2014 Link to this post

    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.


    Marin Bratanov

    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.

  3. DevCraft R3 2016 release webinar banner
  4. Mark
    Mark avatar
    23 posts
    Member since:
    Sep 2014

    Posted 19 Dec 2014 in reply to Marin Bratanov Link to this post

    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
Back to Top