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

Popup resize problem.

3 Answers 106 Views
Window
This is a migrated thread and some comments may be shown as answers.
Vladimir
Top achievements
Rank 1
Vladimir asked on 17 Jan 2011, 12:40 PM
Hi,

 We use iframe to show another page in RadWindow.

We create windows dynamically in code.

 

  function openNewWindow(itemUrl, itemText) {

                    if (itemUrl) {

                        var wHeigh = 400;

                        var wWidth = 550;

 

                        var windowURL = itemUrl;

                       

                        var oWnd = radopen(itemUrl, null);

                        var iconUrl = oWnd.get_iconUrl();

                        // set the new ICon

                        oWnd._titleIconElement.style.background = "transparent url('" + iconUrl + "') no-repeat scroll 0px 0px";

 

                        if (itemText != "") {

                            oWnd.set_title(itemText);

                        }

                        oWnd.moveTo(20, 20);

 

                        oWnd.add_resize(OnClientResize);

 

                        var restZoneDiv = document.getElementById("RestrictionZone");

 

                        oWnd.set_width(wWidth);

                        oWnd.set_height(wHeigh);

                    }

                }

 

 

When resizing RadWindow for the first time height never changes. There is no problem with width but height does not change.

On second attempt all work fine. Good height is retrieved in code and RadWindow is resized correctly.

Do you know where could be a problem?

Thanks for answers

Rado

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 17 Jan 2011, 01:26 PM
Hello,


Have you tied setting AutoSize property of RadWindow to "True"?


-Shinu.
0
Vladimir
Top achievements
Rank 1
answered on 19 Jan 2011, 01:57 PM
Thanks for answering.

It solves the problem with not resizing first time, but it does not work for us.
 We need to set the window size when opening it and that should not change after the content is loaded. (that's what happens with AutoSize="true")
0
Georgi Tunev
Telerik team
answered on 24 Jan 2011, 07:21 AM
Hi Vladimir,

The code that you posted looks OK (I would only recommend to use setSize() instead of set_height/width()). If you still experience problems, please open a support ticket and send us a sample project that isolates the behavior so we can check it.
Thank you in advance for your cooperation.


All the best,
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.
Tags
Window
Asked by
Vladimir
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Vladimir
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or