Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>One approach would be to follow the tutorial outlined in this blog post: <a href="http://sharepointroot.com/2010/06/18/remove-actions-from-the-ribbon-sharepoint-2010/" rel="nofollow noreferrer" title="SharePointRoot: Remove actions from the ribbon">Remove actions from the ribbon: SharePoint 2010</a></p> <p>The end result is a UserControl that you can place on any page and "trim" (i.e. hide) certain portions of the Ribbon: entire tabs, or individual groups or buttons on the ribbon.</p> <p>If you follow the prescribed solution from the blog, then you would add the following lines in your <code>Page_Load</code> event:</p> <pre><code>SPRibbon ribbon = SPRibbon.GetCurrent(this.Page); if (ribbon != null) { ribbon.TrimById( SPRibbon.ListTabId ); ribbon.TrimById( SPRibbon.ListItemTabId ); } </code></pre> <p>Additional ribbon element IDs can be found at:</p> <ul> <li><a href="http://msdn.microsoft.com/en-us/library/ee537543.aspx" rel="nofollow noreferrer">As referenced in the CMDUI.xml XML file</a></li> <li><a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spribbon_members.aspx" rel="nofollow noreferrer">As defined by public fields on <code>SPRibbon</code></a> (used in example above)</li> </ul> <p>Of course, the downside to using this approach is that the particular ribbon elements you hide are hard-coded in the UserControl. To get around this, I used the UserControl as a basis to create a Web Part that allows you to define which ribbon elements to hide via a property. It works great and is generic enough to be applicable to many different scenarios.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload