2

I need to display a standard list inside a modal dialog. Currently I'm using SP.UI.ModalDialog.showModalDialog(..) and I'm building the URL like this:

options.url = "listform.aspx?PageType=0&ListId={...list-guid...}&RootFolder=";

and it works great, but by default the ribbon is collapsed. The problem is - when the user clicks "Items" or "List" tabs, the ribbon shows up, but the dialog is not resizing according its new height, and ugly scrollbars show up.

Is there a way to open the dialog with the Ribbon opened by default ?

UPDATE: I was able to get rid of the scrollbars when the ribbon is opened by overriding default "OnRibbonMinimizedChanged(minimizedRibbon)" handler and calling "autosize()" on a dialog. Details: here. ...But it would still be nice to have an option of showing dialog with already opened Ribbon.

1 Answer 1

1

Yes, add one of these to your URL depending on which tab you want viewed:

&InitialTabID=Ribbon.List &InitialTabID=Ribbon.ListItem // the item tab &InitialTabID=Ribbon.Read // this is the browse tab, no ribbon.

1
  • Tried this solution. Did not work for me.
    – Clem
    Aug 29, 2013 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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