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

RadWindow not showing as modal

2 Answers 350 Views
Window
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 25 Feb 2014, 04:25 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 26 Feb 2014, 12:12 PM
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.
0
Kevin
Top achievements
Rank 1
answered on 28 Feb 2014, 06:06 PM
thanks Marin, I take it the RadWindow manger is for managin multiple windows on the page then.
Tags
Window
Asked by
Kevin
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Kevin
Top achievements
Rank 1
Share this question
or