How to maximize the radwindow

10 posts, 0 answers
  1. AntoineChlorophyll
    AntoineChlorophyll avatar
    5 posts
    Member since:
    Dec 2006

    Posted 17 Jan 2011 Link to this post

    Hi,
    I added some custom tools in my radEditor and I open the RadWindow with this code :

    Telerik.Web.UI.Editor.CommandList["InsertDoc"] = function (commandName, editor, args)
        {
            var myCallbackFunction = function (sender, args)
            {
                alert("Hello World");
            }    
            
            editor.showExternalDialog
            (
                '/Test.aspx',
                {},
                950,
                700,
                myCallbackFunction,
                null,
                'Insert Document',
                true,
                Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
                false,
                true
            );
        };

     It works fine but now, I would like to maximize the RadWindow like with this code

    var manager = $find("<%= RadWindowManager1.ClientID %>");
    var oWin = manager.open("Test.aspx", "RadWindow1");
    oWin.maximize();

    How can I do that ??

    Thanks.
  2. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 20 Jan 2011 Link to this post

    Hello Antoine,

    You can maximize the custom dialog by opening the Test.aspx dialog file and executing getRadWindow().maximize(); in the initDialog function, e.g.

    function initDialog() //called when the dialog is initialized
    {
        var clientParameters = getRadWindow().ClientParameters;
        getRadWindow().maximize();
    }


    Best wishes,
    Rumen
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. AntoineChlorophyll
    AntoineChlorophyll avatar
    5 posts
    Member since:
    Dec 2006

    Posted 21 Jan 2011 Link to this post

    Thanks for the answer but it doesn't work.
    I put the code in my test.aspx page and it seems not to be loaded, so I put a alert in the function and the alert it's not display.
    So I tried to put the code out the initDialog function and the alert is display but the window is not maximized.
  5. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 21 Jan 2011 Link to this post

    Hello Antoine,

    The proposed code works as expected on my end. For your convenience I have attached my test project and a video demonstrating my test at: http://screencast.com/t/Q10hyvhp.

    Am I missing something? Can you please test the project and see whether the dialog is maximized on your side?

    Best regards,
    Rumen
    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. AntoineChlorophyll
    AntoineChlorophyll avatar
    5 posts
    Member since:
    Dec 2006

    Posted 25 Jan 2011 Link to this post

    Thanks, with the window.attachEvent it works fine.
     Have a nice day.
  7. AntoineChlorophyll
    AntoineChlorophyll avatar
    5 posts
    Member since:
    Dec 2006

    Posted 01 Feb 2011 Link to this post

    Hi, I have a problem with firefox.
    In IE the maximize function works great but in firefox it works one time and the second time the window is gray.
  8. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 03 Feb 2011 Link to this post

    Hi Antoine,

    I was unable to reproduce this problem, but I think that it is most likely due to a z-index problem.

    Please, try to fix the problem by firing the following method getRadWindow.set_showOnTopWhenMaximized(false); in the initDialog function:

    function initDialog()
    {
         getRadWindow.set_showOnTopWhenMaximized(false);
    getRadWindow().maximize();
    }

    If you still experience the problem, isolate it in a sample working project and send it for examination through a new support ticket.

    Best regards,
    Rumen
    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.
  9. AntoineChlorophyll
    AntoineChlorophyll avatar
    5 posts
    Member since:
    Dec 2006

    Posted 04 Feb 2011 Link to this post

    I open a support ticket : ID is: 391171
  10. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 04 Feb 2011 Link to this post

    Hello Antoine,

    I just answered your support ticket.

    Here is my answer:


    I was able to reproduce the problem in IE and Firefox. I fixed it in the provided project by executing the getRadWindow().set_showOnTopWhenMaximized(false); method in the initDialog function of the InsertImage.aspx page, e.g.

                function initDialog()
                {
                 getRadWindow().set_showOnTopWhenMaximized(false);
                 getRadWindow().maximize();
                }

    You can see my test in the attached video: http://screencast.com/t/xDs1gYOwqQ.
    I also attached the modified project.


    Greetings,
    Rumen
    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.
  11. Fernando
    Fernando avatar
    6 posts
    Member since:
    Apr 2015

    Posted 04 Sep 2015 Link to this post

    Hi. I went through a similar situation a few weeks ago. I even tested the maximize function but it's make a flickering.
    So I looked for a way to get the width and height of the editor and use these values as parameters.

    I got as follows:

    editor._contentWindow.innerWidth;
    editor._contentWindow.innerHeight;

    I found these options with the Debug Internet Explorer 11.

    Telerik.Web.UI.Editor.CommandList["Parameters"] = function (commandName, editor, args) {
        var argument = $get("parameters").value;
        var editorWidth = editor._contentWindow.innerWidth;
        var editorHeight = editor._contentWindow.innerHeight;
     
        editor.showExternalDialog("ViewParameters.aspx?skin=" + $get("skin").value,
                                    argument,
                                    editorWidth,
                                    editorHeight,
                                    null,
                                    null,
                                    "Parâmetros",
                                    true,
                                    Telerik.Web.UI.WindowBehaviors.Close +
                                    Telerik.Web.UI.WindowBehaviors.Move,
                                    false,
                                    true);
    };

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017