Rad window can be dragged/Opened outside of screen bounderies

6 posts, 0 answers
  1. Tzach Kaufmann
    Tzach Kaufmann avatar
    95 posts
    Member since:
    Aug 2008

    Posted 17 Jul 2012 Link to this post

    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!
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 19 Jul 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Muthuramalingam
    Muthuramalingam avatar
    2 posts
    Member since:
    Feb 2013

    Posted 22 Feb 2013 Link to this post

    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?
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 25 Feb 2013 Link to this post

    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.
  6. Muthuramalingam
    Muthuramalingam avatar
    2 posts
    Member since:
    Feb 2013

    Posted 05 Mar 2013 Link to this post

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

    Posted 06 Mar 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017