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

problem with RadWindow.Close 2n param = true

1 Answer 48 Views
Window
This is a migrated thread and some comments may be shown as answers.
Murray
Top achievements
Rank 1
Murray asked on 25 Feb 2010, 11:04 PM
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


1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 26 Feb 2010, 09:46 AM
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.
Tags
Window
Asked by
Murray
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or