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

How to maximize the radwindow

9 Answers 178 Views
Editor
This is a migrated thread and some comments may be shown as answers.
AntoineChlorophyll
Top achievements
Rank 1
AntoineChlorophyll asked on 17 Jan 2011, 03:58 PM
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.

9 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 20 Jan 2011, 09:02 AM
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.
0
AntoineChlorophyll
Top achievements
Rank 1
answered on 21 Jan 2011, 09:45 AM
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.
0
Rumen
Telerik team
answered on 21 Jan 2011, 10:16 AM
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.
0
AntoineChlorophyll
Top achievements
Rank 1
answered on 25 Jan 2011, 02:48 PM
Thanks, with the window.attachEvent it works fine.
 Have a nice day.
0
AntoineChlorophyll
Top achievements
Rank 1
answered on 01 Feb 2011, 11:37 AM
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.
0
Rumen
Telerik team
answered on 03 Feb 2011, 03:23 PM
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.
0
AntoineChlorophyll
Top achievements
Rank 1
answered on 04 Feb 2011, 10:37 AM
I open a support ticket : ID is: 391171
0
Rumen
Telerik team
answered on 04 Feb 2011, 02:37 PM
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.
0
Fernando
Top achievements
Rank 2
answered on 04 Sep 2015, 01:16 PM

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);
};

Tags
Editor
Asked by
AntoineChlorophyll
Top achievements
Rank 1
Answers by
Rumen
Telerik team
AntoineChlorophyll
Top achievements
Rank 1
Fernando
Top achievements
Rank 2
Share this question
or