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

Rad Window will not stay open

1 Answer 121 Views
Window
This is a migrated thread and some comments may be shown as answers.
Cliff Gibson
Top achievements
Rank 1
Cliff Gibson asked on 18 Oct 2010, 08:21 PM

I've got a test form with a user control inside.  When I click on a button in the user control this opens a rad window - however the window opens and closes immediately and will not stay open...code below...any ideas?

There is no code behind in any of the forms. Using Telerik version 2010-1-519.

Base form in ~/Forms:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestForm.aspx.cs" Inherits="Forms_TestForm" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="Elenco" TagName="EventVenues" Src="~/Forms/Controls/CliffTest.ascx" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
      
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
    </telerik:RadScriptManager>
  
    <div>
        <Elenco:EventVenues runat="server" ID="EventVenues" />
    </div>
  
      
    </form>
</body>
</html>


User Control in ~/Forms/Controls:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CliffTest.ascx.cs" Inherits="Forms_Controls_CliffTest" %>
  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
  
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Button1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Button1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
  
<script type="text/javascript">
    function openRadWinCreateVenue() {
        radopen("../Dialogs/CliffTestDialog.aspx", "RadWindowCliffTestDialog");
    }
  
</script>
  
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="javascript:openRadWinCreateVenue();" />
  
<telerik:RadWindowManager ID="RadWindowManagerEvent" runat="server" 
    Behaviors="Default" InitialBehaviors="None" EnableViewState="False">
    <Windows>
        <telerik:RadWindow runat="server"  ID="RadWindowCliffTestDialog" InitialBehaviors="None" 
            NavigateUrl="~/Dialogs/CliffTestDialog.aspx" ReloadOnShow="true" Animation="FlyIn"
            Height="325px" Modal="true" Title="Create Venue" Width="500px" AnimationDuration="500" 
            Behaviors="Close, Move" Enabled="True" VisibleStatusbar="False" IconUrl="~/favicon.ico" 
            ShowContentDuringLoad="False">
        </telerik:RadWindow>
              
              
    </Windows>
</telerik:RadWindowManager>



Rad Window in ~/Dialogs:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CliffTestDialog.aspx.cs" Inherits="Dialogs_CliffTestDialog" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        dialog
    </div>
    </form>
</body>
</html>




1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 19 Oct 2010, 05:28 AM
Hello Cliff,

You need to cancel the postback.
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="openRadWinCreateVenue(); return false;" />


Best wishes,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Window
Asked by
Cliff Gibson
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or