0

I have a master detail kind of scenario. The detail (edit form) will be open in a Modal Dialog according to the setting below

 function OpenDialog(pageUrl, title) {

        var fullUrl = relativeUrl + pageUrl;

        var options = { showMaximized: true, url: fullUrl, title: title, dialogReturnValueCallback: DialogCallback };
        SP.UI.ModalDialog.showModalDialog(options);
    }

The problem is when the user click the update button in the modal dialog, after postback the modal dialog window size will shrink. It's like the showMaximized value is not set. How do I make sure that the Modal Dialog window size will remain the same after postback.

  • none of these solutions worked for me. Could you please tell me if you found another way to keep the modal dialog size after postback. Thanks. – user14991 Feb 19 '13 at 9:22
3

Did you tried using following in your code ?

autoSize = false;
0

if yaron's solution doesnt work out for you then have you tried EnableViewState?

http://msdn.microsoft.com/en-us/library/system.web.ui.control.enableviewstate.aspx

hope it helps :)

0

Hope, this will help.

function maximizeWindow()
{
    var currentDialog = SP.UI.ModalDialog.get_childDialog();

    if(currentDialog != null)
    {
      // if modal dialog is not maximized then set autosize, else remain maximized
      if(!currentDialog.$S_0)
      {
         currentDialog.autoSize();
      }
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.