Thursday, February 14, 2013

How to refresh parent page after closing a SP.UI.ModalDialog

var options = {
 
url:'/_layouts/YourAspx/YourPage.aspx',
 title: 'Your Application Page Title',
 allowMaximize: false,
 showClose: true,
 width: 700,
 height: 260,
 dialogReturnValueCallback: RefreshOnDialogClose
 };
SP.UI.ModalDialog.showModalDialog(options);


Key here is the callback function; set it to RefreshOnDialogClose. Dead simple ;-)