简体   繁体   English

从子弹出窗口关闭父弹出窗口

[英]Close parent popup from child popup

I am using telrik radopen function to open the popups. 我正在使用telrik radopen函数打开弹出窗口。 I have a situation in which child popup opens from parent popup which opens from grandparent .aspx page. 我有一种情况,子弹出窗口是从父弹出窗口打开的,而父弹出窗口是从祖父母.aspx页打开的。

Grandparent (.aspx page) -> popup (parent) -> popup(child) 祖父母(.aspx页)->弹出(父母)->弹出(子)

I want to close the parent popup and child popup on click of a button on child popup. 我想在单击子弹出窗口上的按钮时关闭父弹出窗口和子弹出窗口。 I tried using 我尝试使用

GetRadWindow().BrowserWindow.BrowserWindow.Close() // this one and variations of this errored !

GetRadWindow().BrowserWindow.close(); // this didn't error but didn't close parent window

GetRadWindow().Close(); //this closes only child window when invoked from button click on //child window

I read the question Is it possible to close parent window from child (Javascript)? 我读过这样的问题:是否可以关闭子窗口(Javascript)的父窗口?

If in case it is not possible to close the parent popup from child popup is there a workaround so that I can simulate the behavior of 'submit button click' on child control can close child and parent popup and refresh the grid on the grandparent .aspx page? 如果无法从子弹出窗口关闭父弹出窗口,则有一种解决方法,以便我可以模拟子控件上的“提交按钮单击”行为,可以关闭子弹出窗口和父弹出窗口并刷新祖父母.aspx上的网格页?

May be redirect can help. 可能重定向可以帮助。 In that case how do I do that? 在那种情况下,我该怎么做? Any suggestions. 有什么建议么。

Thanks 谢谢

Instead of closing all Windows a one shot, you can close Child Window first, then close the Parent Windows (based on the value passed by the Child Window). 您可以先关闭子窗口,然后再关闭父窗口(基于子窗口传递的值),而不用一次性关闭所有窗口。

Window / Returning Values from a Dialog 窗口/从对话框返回值

CommunicationBetweenRadWindowsASPNET.zip CommunicationBetweenRadWindowsASPNET.zip

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM