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

Can't get RadWindow smaller than 150px.

1 Answer 91 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 2
Sean asked on 29 Aug 2011, 11:53 PM
Hi Telerik,

I can't get my RadWindow to size below 150px and I don't know why! It seems super trivial. I've applied the normal CSS fixes. There's no auto-height going on, and I've set dimensions for all my controls. What do you guys think?

Relevant Code:

html, form, body
{
    padding: 0;
    margin: 0;
    width: 250px;
    height: 100%;
    font-size: 12px;
    font-family: "segoe ui",arial,sans-serif;
}
 
.LabelEnabled
{
    color: Black !important;
}
 
.LabelDisabled
{
    color: Gray !important;
}
 
.riTextBox
{
    color: Black !important;
}
 
.BottomButton
{
    margin-left: 93px;
}

<%@ Page Language="C#" EnableViewState="False" AutoEventWireup="True" CodeBehind="UploadDashboard.aspx.cs" Inherits="CableSolve.Web.Dashboard.Dialog.Windows.UploadDashboard" %>
 
<!DOCTYPE html>
 
<html lang="en">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <link rel="stylesheet" type="text/css" href="../../../Content/Dashboard/UploadDashboard.css" />
 
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
 
        <telerik:RadUpload ID="RadUpload1" Runat="server" AllowedFileExtensions=".txt,.xml" Skin="Web20" MaxFileInputsCount="1" ControlObjectsVisibility="None" Height="44px" Width="238px" BorderWidth="0px" >
        </telerik:RadUpload>
 
        <div class="BottomButton">
            <telerik:RadButton ID="RadButton1" Runat="server" Skin="Web20" Text="Upload" OnClick="RadButton1_Click" Height="22px" Width="54px" />
        </div>
 
    </form>
</body>
</html>

<telerik:RadWindowManager ID="RadWindowManager1" Runat="Server" Skin="Web20" Modal="True" KeepInScreenBounds="True" EnableShadow="True" Behaviors="Close, Move" VisibleStatusbar="False" ReloadOnShow="True" ShowContentDuringLoad="False" Behavior="Close, Move" Title="Confirm Action" IconUrl="~/Content/Dashboard/Icons/radwindow_confirmdelete.png">
    <Windows>
        <telerik:RadWindow ID="UploadDashboardWindow" Runat="Server" NavigateUrl="~/Dashboard/Dialog/Windows/UploadDashboard.aspx" IconUrl="~/Content/Dashboard/Icons/drive-upload.png" OnClientAutoSizeEnd="OnClientAutoSizeEnd" Title="Upload Dashboard" Height="100" />
    </Windows>
</telerik:RadWindowManager>

// When a dialog window appears on the page, it does not automatically
// keep itself centered. If the user resizes the browser window, the
// dialog window may drop off the screen. This method keeps dialog windows shown.
function OnClientAutoSizeEnd(dialogWindow) {
    dialogWindow.center();
}

The OnClientAutoSizeEnd event doesn't fire. It's just boilerplate code I've been attaching to all my windows and I show it to be unambiguous with the state of my window.

The only thing I can think of is that there's something weird going on with the Upload control? Its generated markup is more complex than expected.

Thanks

Sean

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 31 Aug 2011, 11:32 AM
Hi Sean,

This behavior is observed because there is a limitation to the height of an iframe nested in a table in all browsers, but IE, and the RadWindow's content is actually an iframe when an external page is loaded. That being said we have taken into account this browser limitation and the height of the RadWindow is limited in non-IE browsers.

You can reproduce the same issue with no complex controls at all:
<table style="height: 80px; border: 3px solid green">
    <tr style="height: 100%">
        <td style="height: 100%">
            <iframe style="border: 1px solid red; height: 100%" src=""></iframe>
        </td>
    </tr>
</table>

What I would suggest is that you do not set content with heights smaller than 150px.

If you want to have a smaller RadWindow you could use its ContentTemplate and add the controls directly there, instead of using an external page.

All the best,
Marin
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Window
Asked by
Sean
Top achievements
Rank 2
Answers by
Marin Bratanov
Telerik team
Share this question
or