简体   繁体   中英

How to refresh parent JQ grid without refreshing the parent page from child popup window in MVC 3?

我正在使用window.open在我的MVC页面中打开一个子弹出窗口,用于关闭弹出窗口时我应该刷新我的父Jquery Grid而不刷新整个页面吗?

You can use reloadGrid to refresh the grid and can use the onbeforeunload event to trigger the grid refresh like the code given below, substitute your grid ID and window URL with yours ID and URL

var myWindow = window.open('your_url')
myWindow.onbeforeunload = function(){ 

$("#your_grid_id").trigger("reloadGrid",[{current:true}]);

}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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