RadWindow loads entire page, not just control.

2 posts, 0 answers
  1. Leon
    Leon avatar
    11 posts
    Member since:
    Jan 2014

    Posted 18 Jul 2014 Link to this post

    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

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 21 Jul 2014 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top