problem with RadWindow.Close 2n param = true

2 posts, 0 answers
  1. Murray
    Murray avatar
    40 posts
    Member since:
    Jun 2007

    Posted 25 Feb 2010 Link to this post

    I'm having a problem with calling RadWindow.Close with 2nd parm = true => keep window open.

    I have the following code:
    DialogBox:
        function GetRadWindow()
        {
            var oWindow = null;
            //Will work in Moz in all cases, including clasic dialog
            if (window.radWindow) oWindow = window.radWindow;
            //IE (and Moz as well)
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }

        function CloseButKeepOpen(returnval)
        {
            var oWindow = GetRadWindow();
            oWindow.Close(returnval, true);
        }

    Main Window:
        radWindow ClientCallBackFunction=DialogCallback

        function OpenDialog()
        {
            var url = "DialogBox.aspx?... params
            var oWnd = window.radopen(url, radWinID);
            oWnd.moveTo(x, y);
            oWnd.SetSize (300, 410);
        }

        function DialogCallback(radWindow, returnValue)
        {
            if (returnValue && returnValue != 'Close')
            {
                // keep window open
                radWindow.Show();

                ...
            }
        }

    I had a previous project that used this, but when i try it now it re-displays the dialog but doesn't keep values last keyed in.
    Page_Load is called again on radWindow.Show()??

    Murray


  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 26 Feb 2010 Link to this post

    Hi Murray,

    Basically, If you don't have ReloadOnShow=true, calling show() should not reload the content page.
    I see however, that you are using an old version of the control - ClientCallbackFunction was deprecated about an year ago and we've removed it in Q3 2009. This being said, I would like to ask you to open a support ticket and to send me a small sample project where I could examine your exact setup more closely - once I have a better view over your case, I will do my best to provide you with a solution.


    Sincerely yours,
    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.
Back to Top