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

Can some one tell where I went wrong in using radwindow

1 Answer 37 Views
Window
This is a migrated thread and some comments may be shown as answers.
Dorababu
Top achievements
Rank 1
Dorababu asked on 27 Jun 2012, 08:59 AM
My design

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="radwindow1.aspx.cs" Inherits="radwindow1" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!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="rad" runat="server">
    </telerik:RadScriptManager>
    <div>
        <telerik:RadWindow ID="rdwndw" runat="server" VisibleOnPageLoad="false">
            <Shortcuts>
                <telerik:WindowShortcut CommandName="CloseAll" Shortcut="Esc" />
            </Shortcuts>
            <ContentTemplate>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <telerik:RadComboBox ID="RadComboBox1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="sel1">
                            <Items>
                                <telerik:RadComboBoxItem Text="One" Value="One" />
                                <telerik:RadComboBoxItem Text="Two" Value="Two" />
                                <telerik:RadComboBoxItem Text="Three" Value="Three" />
                                <telerik:RadComboBoxItem Text="Four" Value="Four" />
                            </Items>
                        </telerik:RadComboBox>
                        <telerik:RadTextBox ID="RadTextBox1" runat="server">
                        </telerik:RadTextBox>
                        <telerik:RadButton ID="RadButton2" runat="server" Text="Save" OnClick="RadButton2_Click">
                        </telerik:RadButton>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </ContentTemplate>
        </telerik:RadWindow>
        <telerik:RadButton ID="rdbtnwhAnother" Text="Add WithHolding" runat="server" ButtonType="LinkButton"
            OnClick="rdbtnwhAnother_Click">
        </telerik:RadButton>
    </div>
    </form>
</body>
</html>

My code is as follows

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Reflection;
 
public partial class radwindow1 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
 
        }
    }
 
    protected void rdbtnwhAnother_Click(object sender, EventArgs e)
    {
        rdwndw.VisibleOnPageLoad = true;
 
    }
 
 
    protected void RadButton2_Click(object sender, EventArgs e)
    {
        rdwndw.VisibleOnPageLoad = false;
    }
 
 
    protected void sel1(object sender, EventArgs e)
    {
        RadTextBox1.Text = RadComboBox1.SelectedItem.Text;
    }
}

Unable to close the window 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Jun 2012, 11:32 AM
Hi Dorababu,

Generally placing the RadWindow in an update panel is not recommended, because the rendered HTML is moved from its original location in the markup. This will most often result in the expected functionality simply not working. Please take a look into this for more information.
Please refer this forum post.

Thanks,
Shinu.
Tags
Window
Asked by
Dorababu
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or