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

RadWindow + Restriction Zone

6 Answers 363 Views
Window
This is a migrated thread and some comments may be shown as answers.
Kaushal
Top achievements
Rank 1
Kaushal asked on 23 Feb 2011, 08:00 AM
Hi,

Here I have one table structure below in which I have to open radwindow by restriction zone id. But Its not working for me.

Table Structure:

<table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <%--This is main DIV [DivMain] for Master page performed as restriction Zone for RadWindow.--%>
            <td id="DivMain" >
                 <telerik:RadWindowManager IconUrl="/images/logos16x16.png" RestrictionZoneID="DivMain"
                    MinimizeZoneID="divFooterSlider" ID="RadWindowManagerMaster" DestroyOnClose="true"
                    runat="server" EnableShadow="true">
                    <Windows>
                        <telerik:RadWindow IconUrl="/images/logos16x16.png" ID="CommonWindowToLoad" runat="server"
                            Animation="Fade">
                        </telerik:RadWindow>
                    </Windows>
                </telerik:RadWindowManager>
            </td>
        </tr>
        <tr>
            <td>
            </td>
        </tr>
</table>

Note: -
1) I have tried with "KeepInScreenBounds".
2) I have tried with "<td id="DivMain"  runat="server">"

By above two options it maximize the window but its maximize to whole browser not limited to that perticular <TD>.

My Javascript by which radwindow calls is below:

 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
function openWin(pagename, radwinname) {
                var FullURL = location.href;
                var urlArr = FullURL.split('/');
                var testUrl = urlArr[0] + "//" + urlArr[2];
                var oWnd = radopen(testUrl + "/" + pagename, radwinname);
                oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Reload + Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Resize + Telerik.Web.UI.WindowBehaviors.Pin + Telerik.Web.UI.WindowBehaviors.Minimize + Telerik.Web.UI.WindowBehaviors.Maximize);
                oWnd.set_title(radwinname);
                oWnd.maximize();
            }
</script>
    </telerik:RadCodeBlock>

Please help me to solve this. Thank you in advance.

Regards,

Kaushal Jani

6 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 23 Feb 2011, 02:09 PM
Hello Kaushal,

By looking at your page markup, you have the table element's width set to 100%, which is the entire width of the screen. The td element takes on that width, thus the reason it takes up the full width of the screen. If you set your table's width to a smaller amount or you add another column in the row your displaying the RadWindow, you can restrict the width of the restriction zone column.

Try running this and tell me if it takes on the full width of the screen:

<table border="1" cellpadding="0" cellspacing="0" style="width: 100%">
        <tr>
            <td id="DivMain" style="width: 50%; height: 500px;">
            </td>
            <td style="width: 50%;">
            </td>
        </tr>
    </table>
    <telerik:RadWindowManager IconUrl="/images/logos16x16.png" RestrictionZoneID="DivMain"
        ID="RadWindowManagerMaster" DestroyOnClose="true" runat="server" EnableShadow="true"
        VisibleOnPageLoad="true">
        <Windows>
            <telerik:RadWindow IconUrl="/images/logos16x16.png" ID="CommonWindowToLoad" runat="server"
                Animation="Fade">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>

I setup two columns, each to occupy 50% of the screen width and the full height of the table 500px.

I hope that helps.
0
Kaushal
Top achievements
Rank 1
answered on 25 Feb 2011, 10:08 AM
Hi Cori,

Thanks for your reply. Actully my concern is not with the width but its with the height. As per my table structure my radwindow is open perfectly but its not open in full height as my restiction zone assigned to it though I have assigned full height to td. Also I am restricted to use height/width in "px" so I have only option to use "%" here.

Thanks once again for your co-operation.

Kaushal Jani 
0
Accepted
Georgi Tunev
Telerik team
answered on 01 Mar 2011, 02:24 PM
Hello guys,

Note that the restriction zone cannot be set in percents. It can be set only once and cannot be changed dynamically after that, because the data about the restriction zone is set when the control is created on the page.

All the best,
Georgi Tunev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Kaushal
Top achievements
Rank 1
answered on 02 Mar 2011, 08:18 AM
Hey Cori,

Thank you for this information. Thanks a lot.

Regards,

Kaushal Jani
0
Tom
Top achievements
Rank 1
answered on 19 Dec 2011, 04:51 PM
Is this still the case?  Or can you change the restriction zone size now?
0
Marin Bratanov
Telerik team
answered on 20 Dec 2011, 04:08 PM
Hello Tom,

The limitation on having a restriction zone in percent still remains. This may sometimes cause the browser to return wrong dimensions and thus the RadWindow may not be able to properly calculate it. Another issue this causes is that the zone can be dynamic if the browser changes size and thus a browser resize can result in the RadWindow suddenly being positioned outside of its restriction zone, which is itself an invalid scenario and should not be allowed to happen, as it is not the RadWindow's code that positioned it outside.

There have been, however, some improvements in the restriction system after Q2 2011, so I suggest you test it out with the new Q3 2011 version. Another addition is the ability to set/remove a restriction zone via the client-side API of the RadWindow.

I also suggest you examine this thread as it treats a similar problem and contains several other suggestions.


All the best,
Marin
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
Tags
Window
Asked by
Kaushal
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Kaushal
Top achievements
Rank 1
Georgi Tunev
Telerik team
Tom
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or