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

RadWindow loads entire page, not just control.

1 Answer 53 Views
Window
This is a migrated thread and some comments may be shown as answers.
Leon
Top achievements
Rank 1
Leon asked on 18 Jul 2014, 02:36 PM
Hi.

Please could you assist.  My radwindow seems to load the entire page inside the popup (with menu, footer etc) instead of just the controls.  Screenshot and code below.

Any help will be appreciated.

Clientside code: shows popup on image click

var BaseURL = "<%= WindowBaseURL%>";
            function ShowSearchForm() {
                var toolBar = $find("<%=toolbarInstruments.ClientID%>");
                var tbButton = toolBar.findItemByText("exchange");
                var cbo = tbButton.findControl("cboExchange");
                if ('<%=IsMobile%>' == 'True') {
                    var navURL;
                    navURL = BaseURL + "&EX=" + cbo.get_value();
                    //location.href = navURL;
                    window.location.href =  navURL;
                }
                else {
                    //Open the RADWindow
                    var params = document.getElementById('<%=hfParams.ClientID%>').value;
                    var symbolmanager = $find("<%= rwmWatchlist.ClientID %>");
                    var toolBar = $find("<%=toolbarInstruments.ClientID%>");
                    var tbButton = toolBar.findItemByText("exchange");
                    var cbo = tbButton.findControl("cboExchange");
                    var navURL;
                    navurl = BaseURL + '&EX=' + cbo.get_value();
                    symbolmanager.open(navurl , "FindDialog");
                    symbolmanager.SetTitle("Search");
                    return false;
                }
            };

server code: Radwindow declaration
<telerik:RadWindowManager ID="rwmW" runat="server" EnableShadow="true">
        <windows>
            <telerik:RadWindow ID="FindDialog" Title="Instrument Lookup" runat="server" Modal="true"
                ReloadOnShow="True" Overlay="True" KeepInScreenBounds="True" Behaviors="Close,Move,Resize"
                OnClientClose="OnClientClose" ShowContentDuringLoad="false" EnableShadow="false"
                VisibleStatusbar="false" AutoSize="False" VisibleOnPageLoad="False" rendermode="lightweight" width="1042px" EnableEmbeddedSkins="true"/>
        </windows>
    </telerik:RadWindowManager>

Public
ReadOnly Property WindowBaseURL As String
        Get
            If IsMobile Then
                Return String.Format("{0}/mid/{1}?{2}", DotNetNuke.Common.Globals.NavigateURL("Search"), Me.ModuleId, "popUp=false")
            Else
                Return UrlUtils.PopUpUrl(EditUrl("Search"), Me, PortalSettings, False, True)
            End If
        End Get
    End Property

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 21 Jul 2014, 11:16 AM

Hello Leon,

RadWindow merely passes the URL the developer provides to a simple iframe to load the designated document. It does not change it and it does not control the content the server sends.

Most likely, the page you open has a master page with the menus and the other elements you do not want. In this case you would need to consider removing/hiding them according to an additional querystring param, or using a different master page, if possible.

Once you can put the same URL in a simple iframe and show the desired content, the RadWindow should behave in the same way.

On a side note - to set the RadWindow title you should use the RadWindow instance and its set_title() method instead of a method on the RadWindowManager. The manager's open() method returns the RadWindow instance for you to use.


Regards,

Marin Bratanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

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