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

RadWindow and browser boundary issue

1 Answer 92 Views
Window
This is a migrated thread and some comments may be shown as answers.
PPSDevs
Top achievements
Rank 1
PPSDevs asked on 12 Apr 2010, 09:39 PM
I have a very long ASPX page with a pop-up RadWindow that displays when page is loaded. I want this window to move along with the page as user scrolls down the page. So I added "PIN" in the behavior property and it works.

I also want the user to be able to move and/or resize the pop-up window. But I want the user NOT to be able to drag/resize the window beyond the browser boundary. I can't use RestrictedZoneID property of the RadWindow.

I tried looking for sample but I couldn't fine one. Is there a way to achieve this? If yes, how? Please let me know asap.

Thanks

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 13 Apr 2010, 08:32 AM
Hello Manjeet,

In such case I suggest to try the following code that must be hooked to the RadWindow's OnClientDragEnd eventhandler:

function OnClientDragEnd(oWnd) 
    { 
        window.setTimeout(function() 
        { 
            var bounds = oWnd.getWindowBounds(); 
            if(bounds.y < 0) 
            { 
                oWnd.moveTo(bounds.x,0); 
            } 
        }, 0); 
         
    } 

The code above checks if the window is moved in a negative Y coordinate and if so - moves the Radwindow back on zero Y position. You could use it as a base and extend it further if needed.


I hope this helps.

Kind regards,
Georgi Tunev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Window
Asked by
PPSDevs
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or