Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 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.

share|improve this answer
    
Tried this solution. Did not work for me. –  Clem Aug 29 '13 at 20:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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