pop-up window does not close

2 posts, 0 answers
  1. Anumeha
    Anumeha avatar
    36 posts
    Member since:
    Aug 2010

    Posted 23 Dec 2010 Link to this post

    I load a pop-up window fromone of my pages and based on certain action in the pop-up I need to close the pop-up and refresh data on the parent page.
    I used the functionality as shown in the demo - http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window

    I was able to send back arguments to the parent page and the ajaxrequest is initiated. But as soon the page is posted back my pop-up window shows up again. If I comment the code to initiate the ajaxrequest everything looks ok.

    Below is the code I am using:

    On Parent Page:
    function OnClientClose(args) {
                    var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
                    var arg = args.argument
                    if (arg) {
                    else {
    Window declaration on parent page:
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" 
            Behavior="None"  ShowContentDuringLoad="false" Width="900px">
                <telerik:RadWindow ID="RadWindowSelectPolicyRole" runat="server"  DestroyOnClose="false" Title="Activity" OnClientClose="OnClientClose"
                     Behavior="None" ReloadOnShow="true" ShowContentDuringLoad="false"
                    Width="975px" Height="545px" Modal="true" />
    Protected Sub manager_AjaxRequest(ByVal sender As Object, ByVal e As AjaxRequestEventArgs)
            If e.Argument = "Refresh" Then
            End If
        End Sub
    on my dialog page I close the window like this:
    function CloseWindowOnSuccess() {
                var oWnd = GetRadWindow();
                if (oWnd != null) {
                    oWnd.argument = "Refresh";

    I am unable to understand why the pop-up window is loaded once the ajax request is initiated?
  2. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 24 Dec 2010 Link to this post

    Hello Anumeha,

     I applied the changes you mention in the sample demo code but unfortunately to no avail - everything works as expected.

    The only thing Is can suggest without examining and debugging demo code are the following ones:

    1) Make sure that you do not get any js error - in case such is thrown, this can cause unexpected behavior, including RadWindow stop working

    2) Make sure that you do not set the VisibleOnPageLoad property to true without resetting it to false when needed.

    3) Make sure that you do not open the window in this method PopulateAdditionalContacts

    In case the above does not help, please prepare a sample,. fully runnable reproduction demo, open a new support ticket and send it to me along with detailed reproduction steps and explanations and I will do my bets to help.

    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top