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

OnClientClose does not work on Child Window

1 Answer 44 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Matthew asked on 27 Sep 2012, 01:05 PM
Hi all,

My scenario is Iike that: Main page let's say A has a button and after it's clicked a rad window is opened. Let's say this page B. In page B after a button clicked, a new page called C is opened. My problem was at first C page was surrounded by page B. I could not get out of boundaries of the page B.

After i read the document on i solved my problem.

But here is another issue. When i close page C, i could not handle OnClientClose event on page B. I tried many things but i could not success.

Some codes from page B :

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
function OpenDefectStockItemPanel() {
                var getRecordId = document.getElementById("<%= getRecordId.ClientID %>").value;
                var url = "DefectStockItemPanel.aspx?ID=" + getRecordId;
                var oBrowserWnd = GetRadWindow().get_windowManager();
                oBrowserWnd._width = 1100;
                oBrowserWnd._height = 600;
                setTimeout(function () {
          "DefectStockItemPanel.aspx?url=" + encodeURIComponent(url),
                }, 0);
                 return false;
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
            <telerik:RadWindow ID="DefectStockDialog2" runat="server" Title="Hasar-Ürün Yönetimi"
                Width="400px" Height="600" ReloadOnShow="true" OnClientClose="RadWindowOnClientClose"
                ShowContentDuringLoad="false" Modal="true" />

GetRadWindow().get_windowManager(); connects RadWindowManager of page A not B so this RadWindowManager1
is useless right ? Otherwise i will again hangout to the boundaries of B. Ok add_close method can not be
to a radwindowmanager right ? What should i do to be aware Page C is closed or not. (My aim is to refresh page B on Page C close)

Thank you.

1 Answer, 1 is accepted

Sort by
Top achievements
Rank 1
answered on 27 Sep 2012, 02:52 PM
Sorry for the inconvenience. I solved my problem.

The rad window manager in Page A also handles rad window opened in page C. So setting onClientClose property of RadWindowManager did what i want. My mistake was trying to handle onClientClose from page B.

Asked by
Top achievements
Rank 1
Answers by
Top achievements
Rank 1
Share this question