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

Rad window can be dragged/Opened outside of screen bounderies

5 Answers 390 Views
Window
This is a migrated thread and some comments may be shown as answers.
Covertix
Top achievements
Rank 1
Covertix asked on 17 Jul 2012, 09:36 AM
Hi,

I have two issues with rad window:

1. Is it possible to prevent rad window from being dragged outside of the screen boundaries?I tried using
KeepInScreenBounds property, but it didn't help.

Here is my code example, and screen shot is attached:

 

<telerik:RadWindowManager ID="rwm" runat="server" ShowContentDuringLoad="false" Behaviors="Close,Move"

VisibleStatusbar="false" Skin="Gray" Modal="true" KeepInScreenBounds = "true">

<Windows>

 

<telerik:RadWindow ID="rwAuditCredentials" runat="server" NavigateUrl="~/Pages/Audits/AuditCredentials.aspx"

Title="Audit Credentials" Height="230px" Width="360px" KeepInScreenBounds="true">

</telerik:RadWindow>

</Windows>

 

</telerik:RadWindowManager>

2. How can I prevent from radwindow from being opened outside of the screen bounderies?
I got my radwindow opened when the title bar is outside the screen bounderies (as it looks in my print screen) and I couldn't drag it or close it.

Thanks!

5 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 19 Jul 2012, 02:34 PM
Hi Tzach,

The result shown on your screenshot might happen if KeepInScreenBounds is false and it is true in the definition you have provided. However I also see that your RadWindow should have 360px width but it has less width (300, which is the default). That is why I assume that you might have another RadWindowManager which does not have KeepInScreenBounds set to true and the window is actually created by it.

Generally, the RadWindowManager control is designed as singleton and there should be only one instance of it on a page. If you have more managers in the resultant page (e.g coming for user controls, master page, etc) this should not impact the performance significantly but only one of the managers will be "active", depending on the manager's creation time. As a result, if you want to call methods as radalert, radopen, etc the active manager will execute them with its settings. We recently provided the ability to close these methods as methods of the manager client object and this would fix the  problem explained above and makes the usage of multiple managers possible. However, since the initial intend was different, I recommend to use only one manager despite this. Usually, the manager is put on the main page or the master in order to enable radalert, radconfirm, etc for all pages and in user controls and content page - separate RadWindows are used (you can use a separate RadWindow without a manager and there is no limitation of their number).

This being said, I recommend to use only one RadWindowManager and separate RadWindows on other code segments. However, if you prefer to use multiple managers, you should not call methods as 'static' but as instance methods, e.g rwm.radopen instead of radopen.

I  hope that my reply is detailed enough and helpful, let me know how it goes.



Greetings,
Svetlina Anati
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Muthuramalingam
Top achievements
Rank 1
answered on 22 Feb 2013, 09:51 AM
rad popup with different screen resouliton

hi am using the below code

 

 

<telerik:RadWindow ID="rwData" runat="server" Title="Data" Height="480px" Width="1200px"

 

 

 

MaxHeight="480px" MaxWidth="1200px" MinHeight="480px" MinWidth="1200px"

 

 

 

Left="10px" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true"

 

 

 

Behaviors="Close, Move, Pin"/>

 



to open the popup but in client environment their having different resolution, so so many spaces are left balank after displaying the popup in the screen how to slove this?
0
Marin Bratanov
Telerik team
answered on 25 Feb 2013, 12:05 PM
Hello,

I can suggest that you take a look at this KB article on setting a RadWindow's size so that it fills a certain percentage of the screen: http://www.telerik.com/support/kb/aspnet-ajax/window/setting-size-in-percent-for-the-radwindow.aspx.


Kind regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Muthuramalingam
Top achievements
Rank 1
answered on 06 Mar 2013, 05:31 AM
thanks, its working but i have a another issue after fixing this the parent window get the scroll when we opne the child window, can you please help on this
0
Marin Bratanov
Telerik team
answered on 06 Mar 2013, 04:02 PM
Hello Muthuramalingam,

Without inspecting the actual code that causes the problem it is very difficult to say what the reason for this may be.

If you are resizing the RadWindow after showing it then you center it it will stretch the form (i.e. the top left corner stays in place, the size increases to the right and down, then center repositions it, but the size increase has already spawned scrollbars). In this case you can first use moveTo(0,0) to have as much room as possible for resizing.

If this is not the case I advse you remove all custom CSS from the page. If the issue is gone start re-adding it back piece by peace to find the problematic rule. It will, most likely, be a rule for a high-level element like the form or the body that affects the positioning of all elements below (the RadWindow is rendered as a direct child of the form element). If this is the problem usually moving the rule to a div inside the form to provide the desired styling will resolve the problem.


Kind regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Window
Asked by
Covertix
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Muthuramalingam
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or