Maximize client side and modal

8 posts, 0 answers
  1. MD
    MD avatar
    55 posts
    Member since:
    Jul 2012

    Posted 07 Oct 2010 Link to this post

    I have a window that a user can open multiple times while on a page and is defined in a RadWindowManager and opened client side uses the below code.  I need the window maximized every time it is opened so I call the maximize function since the InitialBehaviors is only used the first time the windows is opened.  The window is defined in the RadWindowManager as a modal window and when the maximize function is called the window gets maximized, but is moved behind it's own gray background making it unusable.  If I set the ShowOnTopWhenMazimized to false it maximizes the window without moving it back, but this doesn't seem logical.  Is there a better way to do this or is there a fix.

    function openWindow(link, radWindowID, maximize){
        var oManager = $find("<%= RadWindowManager.ClientID %>");
        var oWin = oManager.open(link, radWindowID);
        if(maximize) oWin.maximize();
        return false;
    }
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 08 Oct 2010 Link to this post

    Hello MD,

    Please make sure that you are using a recent version of the control. I recall having such problem before, but it was fixed in an update. If you are using the most recent version and still experience problems, it will be best to send us a sample project that reproduces them. We will check it right away and do our best to help.


    All the best,
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jonx
    Jonx avatar
    258 posts
    Member since:
    Jul 2012

    Posted 09 Jan 2011 Link to this post

    Hello,
    I have the same issue with version 2010.3.1215.40

    All I want is have my radwindowes maximized when I open them. I want them to take all the screen and removed all the behaviors.
    The user can close the windows throught a buton I put on the page.

    I shouldn't have to call any script to have it maximized all the time. How can I do that. Like MD says, when I maximize the window by script in modal mode, the window gets under the modal grey div. The window has a z-order of 100000 whereas the modal div has 100001...

    When setting ShowOnTopWhenMazimized to false it gets opened correctly. Thank you very much MD for puting this out.

    So, how in the first place am I supposed to make my window open maximized "all the time"...

    Thank you for your help...
    John.

    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="True"
        ReloadOnShow="true" ShowContentDuringLoad="false" Modal="True" Skin="Office2007" >
        <Windows>
            <telerik:RadWindow ID="StagiairesDialog" runat="server" Title="Stagiaires" InitialBehaviors="Maximize"
            Behaviors="Maximize" ShowOnTopWhenMaximized="false" OnClientShow="SetWindowBehavior"
            EnableEmbeddedSkins="false" VisibleStatusbar="false" VisibleTitlebar="false" />
        </Windows>
    </telerik:RadWindowManager>

    the script:
    function SetWindowBehavior(sender) {
        oWnd = sender;
        oWnd.maximize()
    }

    And this is how I close the window:
    <telerik:RadButton ID="btnClose" runat="server" Text="Fermer" CommandName="Close"
                        OnClick="btnClose_Click">
                        <Icon PrimaryIconCssClass="rbCancel" PrimaryIconLeft="4" PrimaryIconTop="4" />
    </telerik:RadButton>

    protected void btnClose_Click(object sender, EventArgs e)
            {
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "mykey", "CloseAndRebind();", true);
            }

    function CloseAndRebind(args) {
        GetRadWindow().Close();
        GetRadWindow().BrowserWindow.refreshGrid(args);
    }



  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 12 Jan 2011 Link to this post

    Hello John,

    Currently, RadWindow can be maximized automatically only when initially shown - by using InitialBehaviors="Maximize". If you close that window and show it again after that (this assumes that DestroyOnClose is set to false), RadWindow should be maximized with code.


    Best wishes,
    Georgi Tunev
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  6. Jonx
    Jonx avatar
    258 posts
    Member since:
    Jul 2012

    Posted 12 Jan 2011 Link to this post

    Hello Georgi,
    Thank you for confirming this. Sad that we need to use a script (not really documented) to make this happen.

    But what about the ShowOnTopWhenMazimized = true ? Why does popup appear under the modal grey layer ?
    this does not seem to be logical that I have to use it set to false. or maybe I did not understand what this parameter is doing...

    Thanks again,
    John.
  7. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 17 Jan 2011 Link to this post

    Hi John,

    Basically, by design, when a RadWindow is maximized, it gets a very high z-Index. This however, leads to problems - for example when you want to show a non maximized RadWindow in front of a maximized one (common case in MDI). When ShowOnTopWhenMaximized is set to false, it ensures that the highest z-Index will be assigned not to the maximized RadWindow, but to the active one.


    Kind regards,
    Georgi Tunev
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  8. Jonx
    Jonx avatar
    258 posts
    Member since:
    Jul 2012

    Posted 17 Jan 2011 Link to this post

    Ha OK, I understand. It makes sense.

    The reason that makes that I need maximized dialogs in the first place is because I use pretty large drop down comboboxes.
    They do not fit well in small dialogs...

    It would be nice if I was able to open the combo in the context of the parent window so that the control can expand outside the dialog limits.
    That way the dialog would have a normal dialog size and the comboboxes could expand as much as they need.

    Is this something already possible and I missed the way to do it? It would be nice to offer the option to do so on your control: being able to expand outside the limits of the current frame by using the parent (eventually the top parent) frame.

    Thanks again,
    John.
  9. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 19 Jan 2011 Link to this post

    Hello MD,

     When you use the RadWindow with a NavigateUrl and another page loaded inside it, this is a new document loaded in an IFRAME and thus it cannot get outside the RadWindow.

    However, if you implement the RadWindow with a ContentTemplate, the content will be on the same page and the dropdown will show outside the RadWindow - for your convenience I prepared for you the following sample code:

    <%@ Page Language="C#" %>
      
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <script type="text/javascript">
            function OpenWnd()
            {
                var oWnd = $find("<%=wnd.ClientID %>");
                oWnd.show();
            }
      
        </script>
        <telerik:RadWindow ID="wnd" runat="server" Modal="true">
            <ContentTemplate>
                <telerik:RadComboBox ID="cm" runat="server" DropDownWidth="800">
                    <Items>
                        <telerik:RadComboBoxItem Text="Test" />
                        <telerik:RadComboBoxItem Text="Test" />
                        <telerik:RadComboBoxItem Text="Test" />
                        <telerik:RadComboBoxItem Text="Test" />
                        <telerik:RadComboBoxItem Text="Test" />
                        <telerik:RadComboBoxItem Text="Test" />
                        <telerik:RadComboBoxItem Text="Test" />
                        <telerik:RadComboBoxItem Text="Test" />
                    </Items>
                </telerik:RadComboBox>
            </ContentTemplate>
        </telerik:RadWindow>
        <asp:Button ID="btn" runat="server" Text="Open RadWindow" OnClientClick="OpenWnd(); return false;" />
        </form>
    </body>
    </html>

     

    Regards,
    Svetlina
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017