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

RadWindow do not change size automatically

2 Answers 100 Views
Window
This is a migrated thread and some comments may be shown as answers.
lina fetisova
Top achievements
Rank 1
lina fetisova asked on 26 Oct 2010, 07:04 AM
Good day!
I try to do everything like in this sample (http://demos.telerik.com/aspnet-ajax/window/examples/autosize/defaultcs.aspx), but something is wrong and when I add files using my RadAsyncUpload in the Window, there are a lot of files but the window do not change it's size =(
You can see it in the attached file.
Please, can you tell me what I do wrong?
Here is my code.

<telerik:RadWindowManager ID="winManager"
        runat="server" >
        <Windows>          
            <telerik:RadWindow ID="RadWindow1"  BackColor="White" OnClientClose="OnClientClose2"  Width="400px" Height="400px"
            VisibleStatusbar="false" Skin="Office2007" Behaviors="Close, Resize, Move" IconUrl="../App_Themes/Theme1/Image/1288064592_view_remove.ico"
            Animation="Fade" AutoSize="true" ShowContentDuringLoad="false" EnableShadow="true"
            NavigateUrl="../Administrators/FileWindows/UploadFile.aspx" runat="server"  Title="Загрузить файл" />          
       </Windows>
    </telerik:RadWindowManager>


UploadFile.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UploadFile.aspx.cs" Inherits="CAP.Site.Administrators.FileWindows.UploadFile" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        body   
        {    
            font-size: 12px;
            font-family:  "Segoe UI", Arial, sans-serif, Verdana, Tahoma, Helvetica;    
            color: #000000;         
        }
        .MySimpleButton
        {
            font-family: "Segoe UI", Arial, sans-serif, Verdana;
            font-size: 1.0em;
            height: 24px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">

     <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function returnToParent() {
                var oArg = new Object();
                oArg.pressCancel = "False";
                var oWnd = GetRadWindow();
                oWnd.close(oArg);
            }
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow)
                    oWindow = window.radWindow;
                else if (window.frameElement.radWindow)
                    oWindow = window.frameElement.radWindow;
                return oWindow;
            }
            function cancel() {
                var oArg = new Object();
                oArg.pressCancel = "True";
                var oWnd = GetRadWindow();
                oWnd.close(oArg);
            }
        </script>
        </telerik:RadCodeBlock>
    <telerik:RadScriptManager ID="ScriptManager1" runat="server" />

    <div class="upload-panel" style="min-height: 350px; min-width: 350px; display: block; width: auto; height: auto;" >
        <telerik:RadProgressManager runat="server" ID="RadProgressManager1" Skin="Office2007"  />                                                        
        <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" Skin="Office2007" Width="97%" MultipleFileSelection="Automatic"/>

        <telerik:RadProgressArea runat="server" ID="RadProgressArea1"
            Skin="Office2007"/>
    </div>
    <asp:Label ID="InjectScript" Runat="server" Width="330px"></asp:Label>
    <br /><br />
    <asp:Button runat="server" Text="Сохранить" onclick="Unnamed1_Click" CssClass="MySimpleButton" />
    <button title="Закрыть" id="btClose" class="MySimpleButton" onclick="cancel(); return false;">Закрыть</button>

    
    </form>
</body>
</html>

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 26 Oct 2010, 08:37 AM
Hi Lina,


How about adding the following style on page (UploadFile.aspx) to hide the scroll-bars showing for window?

CSS:
<style type="text/css">  
    HTML  
    {  
        overflow-x: hidden;  
        overflow-y: hidden;  
    }  
</style>



-Shinu.
0
lina fetisova
Top achievements
Rank 1
answered on 26 Oct 2010, 08:55 AM
Shinu thank you very much
overflow-y: hidden;    is very helpfull
but overflow-x: hiddenlooks strange - I do not see a part of my form and I may not guess why it has dissapeared (
Tags
Window
Asked by
lina fetisova
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
lina fetisova
Top achievements
Rank 1
Share this question
or