Link to home
Start Free TrialLog in
Avatar of XGIS
XGISFlag for Australia

asked on

Telerik RadWindow Autosize Feature Issues

We have a RadWindow working from an ASCX Control to display video content (SWF Object) which is on an ASPX page..

We have a 2nd RadWindow which displays a large image directly without having an ASPX page. we suspect that if we make the image display on an ASPX it may resolve the AutoSize issue, but before we do that there may be a better solution.

All files are stored in the database as strings and the path determine by C# to obtain the correct image or video from the image and video folders.

When the AutoSize="true" the video works well, firing a VideoViewer.aspx in RadWindow1.
I have set the width and height on the window (on the ascx) and the object (on aspx).  

When you load an image RadWindow2 with AutoSize="true" (and width and height included) the RadWindow containing the image Shrinks to its smallest size.

Is there a possible behind code or javascript solution to this problem?
 User generated image User generated image
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="true" VisibleTitlebar="false"
    VisibleStatusbar="false" ForeColor="Lime" DestroyOnClose="true"
    BackColor="Black">
    <Windows>
        <telerik:RadWindow runat="server" ID="RadWindow1" Behaviors="Reload,Resize,Minimize,Maximize,Close"
            VisibleTitlebar="true" VisibleOnPageLoad="false" Animation="Fade" Title="XGIS Lesson Video Viewer"
            AutoSize="true" Width="1050px" Height="670px" VisibleStatusbar="false" KeepInScreenBounds="True"
            Skin="Black" OnClientClose="onClose" >
        </telerik:RadWindow>
        <telerik:RadWindow runat="server" ID="RadWindow2" Behaviors="Reload,Resize,Minimize,Maximize,Close"
            VisibleTitlebar="true" VisibleOnPageLoad="false" Animation="Fade" Title="XGIS Lesson Video - Image Viewer"
            BorderStyle="Inset" VisibleStatusbar="false" Width="1050px" Height="670px" KeepInScreenBounds="True" BackColor="Black"
            Skin="Black">
        </telerik:RadWindow>
 </telerik:RadWindowManager>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of remorina
remorina
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of XGIS

ASKER

Hello Remorina..Yes to both having height and width defined.  The video actually has it twice on the object parameters, then again on the ascx that fires the page.  The video works fine but the images dont, and they only have the height and width defined once on the actual rad window control.

It is in the same domain, the main website domain. Files are also located within the application in an adjacent folder.
Avatar of XGIS

ASKER

That is a nice demo Remorina, i will give it a go and see if i can integrate the idea.
Avatar of XGIS

ASKER

Gday Remorina, We ended up fixing it using the ideas you linked us to + some code rewiring, including pushing the image to a New ASPX Page.  It works fine now, although the code is in 3 languages and i can add only 1 snippet. Cheers Aaron
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
    OnAjaxRequest="RadAjaxManager1_AjaxRequest">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel2" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel2" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Black" />
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" Skin="Black" />
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="true" VisibleStatusbar="false"
    ForeColor="Black" BackColor="Black" Behaviors="Reload,Resize,Minimize,Maximize,Close"
    VisibleTitlebar="true" VisibleOnPageLoad="false" KeepInScreenBounds="True" Skin="Black"
    AutoSize="true" Animation="Resize">
    <Windows>
        <telerik:RadWindow runat="server" ID="RadWindow1" Title="XGIS Lesson Video Viewer"
          OnClientClose="onClose">
        </telerik:RadWindow>
        <telerik:RadWindow runat="server" ID="RadWindow2" Title="XGIS Lesson Video - Image Viewer"
            BorderStyle="Inset">
        </telerik:RadWindow>
        <telerik:RadWindow runat="server" ID="InfoPopup" VisibleTitlebar="true" DestroyOnClose="false"
            Width="400px" Height="500px" Animation="Slide" Title="The ESRI GIS Dictionary"
            Skin="Black" AutoSize="false" Behaviors="Minimize,Maximize,Close" BorderStyle="Groove"
            KeepInScreenBounds="True">
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>
<asp:Label ID="lblVidReg" runat="server" Visible="False" />
<asp:Label ID="lblVidHits" runat="server" Visible="True" Style="color: #FFFFFF" />
<asp:Label ID="lblVidImage" runat="server" Visible="True" Style="color: #FFFFFF" />
<asp:Label ID="lblFileSize" runat="server" />
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script language="javascript" type="text/javascript">
        function openRadWindow(url) {
            var oWnd = radopen(url);
            return false;
        }
        function onClose() {
            $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("closed");
        }
        function RowSelected(row) {
        }
    </script>
</telerik:RadCodeBlock>

Open in new window

Hi Aaron,
Although I'm not the back-end guy but it's sometimes painful when it comes to work with or customise telerik controls in both client & server side.

I'm glad the link was useful and you got it working after all

Cheers
I am having the same problem and need some help, if anyone is following this, can you check my post here:

https://www.experts-exchange.com/questions/26310952/RadWindow-in-DotNetNuke-Module-Collapsing-in-IE-but-not-in-Chrome.html?cid=1416#postComment