Facing issue while closing RadWindow

3 posts, 0 answers
  1. Nileshkumar
    Nileshkumar avatar
    18 posts
    Member since:
    May 2011

    Posted 29 Jul 2014 Link to this post

    We are facing issue while closing the telerik rad window. In telerik rad window, we are doing updates and clicks on ‘Save’ button. At the same time clicks on window’s tab and drag the window. After sometime the rad window will pop-up but we are unable to close the window by clicking on ‘Cancel’ link or ‘Close’ icon.
    On click of ‘Cancel’ button application is calling “CloseAndRebind” function to close the window. Code is written as mentioned below
    function CloseAndRebind() {
                        function GetRadWindow() {
                            var oWindow = null;
                            if (window.radWindow)
                                oWindow = window.radWindow; 
                            else if (window.frameElement.radWindow)
                                oWindow = window.frameElement.radWindow; 
                            return oWindow;
    Same behavior we have observed in one of the demo of telerik rad window. 
    URL of Telerik  rad window demo: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window
    Steps to reproduce issue in demo URL
    1. Click “Add New Record” link
    2. Click on “Insert” button
    3. At the same time drag the popup
    4. New record will be inserted but pop-up will not closed, now click on “Cancel” button
    Pop-up should be closed but it isn’t. We are facing the same issue.
    Please do needful.
  2. Marin Bratanov
    Marin Bratanov avatar
    3555 posts

    Posted 30 Jul 2014 Link to this post

    Hello Nileshkumar,

    This happens because when the user drops the mouse there is code that is supposed to execute which repaints the RadWindow. If it is already closed, it will be shown but the needed handlers will not be attached.

    To avoid this, you have two options:

    • disable the Move and Resize behaviors (either from the markup, or dynamically, when the update/insert is initiated)
    • use the control's events to check if it is already closed when dragging/resizing ends and hide its popup if so. I am attaching a simple example of this approach here.

    I hope this explains the case.


    Marin Bratanov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
  4. Rahul
    Rahul avatar
    27 posts
    Member since:
    Jul 2015

    Posted 23 Dec 2015 in reply to Nileshkumar Link to this post

    I now this post is older one but may help to some one else

    Just need to modify your CloseAndRebind Method as follow

    function CloseAndRebind(){         
          var oWnd=GetRadWindow();            
          if (!oWnd._popupVisible) {
               oWnd._popupVisible = true

Back to Top