RadWindow not showing as modal

3 posts, 1 answers
  1. Kevin
    Kevin avatar
    265 posts
    Member since:
    Jun 2011

    Posted 25 Feb 2014 Link to this post

    I have run into a situation where the Radwindow is not showing as a modal window.  I have given it all the properties, even tried setting with javascript but no joy, it does not show up as a modal window and I can click on stuff in the background.  Is there something I am missing.  Using Q3 controls with IE9.  I am also using a master page but it has always worked before inside a master page.  totally lost at this point as to why its not working.

    <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
        <link href="../Styles/Styles.css" rel="stylesheet" />
     
        <script type="text/javascript">
            function GetWindow(Token) {
                var radDash = $find("<%= radWindow.ClientID%>");
                if (Token == 0) {
                    radDash.setUrl("Request.aspx?Type=" + 0);
                }
                else if (Token > 0) {
                    radDash.setUrl("Request.aspx?Type=" + Token);
                }
     
                radDash.set_modal(true);
                radDash.show();
            }
        </script>
     
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="BodyContent" Runat="Server">
        <telerik:RadGrid ID="myRadGrid" runat="server" AutoGenerateColumns="false" Skin="Web20" Font-Size="10" OnNeedDataSource="myRadGrid_NeedDataSource">
            <MasterTableView runat="server" DataKeyNames="intRequestId" CommandItemDisplay="Top">
                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Center" />
                <AlternatingItemStyle HorizontalAlign="Center" BorderColor="#404040" />
                <CommandItemStyle HorizontalAlign="Left" Height="25px" VerticalAlign="Middle" />
                <CommandItemTemplate>
                    <a href="#" id="Request" onclick="GetWindow(0);return false;">Request Token</a>
                </CommandItemTemplate>
                <Columns>
                    <telerik:GridBoundColumn DataField="Name" HeaderText="NAME" />
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
        <telerik:RadWindowManager ID="radWindow" runat="server" CenterIfModal="true" Width="800px" Height="450px" Modal="true" ShowContentDuringLoad="false" Skin="Web20" Behaviors="Close" VisibleStatusbar="false">
        </telerik:RadWindowManager>
    </asp:Content>




  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 26 Feb 2014 Link to this post

    Hello Kevin,

    What I see is that you access a RadWindowManager and try to use the RadWindow API on it (set_modal(), show(),..). You need to use a RadWindow and not a RadWindowManager: http://www.telerik.com/help/aspnet-ajax/window-programming-opening.html.

    Here is an example that should work, based on the snippets above:
    <a href="javascript:void(0);" id="Request" onclick="GetWindow(0);return false;">Request Token</a>

    function GetWindow(Token)
    {
        var radDash = radopen(null, "DashRequestWindow"); //just a name should you want to reuse it later
        //otherwise, leave it null and use set_destroyOnClose(true);
     
        //modify the RadWIndow after it is shown
        radDash.show();
        radDash.set_modal(true);
        if (Token == 0)
        {
            radDash.setUrl("Request.aspx?Type=" + 0);
        }
        else if (Token > 0)
        {
            radDash.setUrl("Request.aspx?Type=" + Token);
        }
    }

    If this does not work too, I would advise opening a support ticket and sending us a small sample that we can run and observe the problem so we can offer a more concrete response.

    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kevin
    Kevin avatar
    265 posts
    Member since:
    Jun 2011

    Posted 28 Feb 2014 in reply to Marin Bratanov Link to this post

    thanks Marin, I take it the RadWindow manger is for managin multiple windows on the page then.
Back to Top