SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My question is straight forward, how do i programmatically untrim the trimmed control on the Ribbon?

So if this happens:

 SPRibbon current = SPRibbon.GetCurrent(this.Page);
            if (current == null)

How do i untrim it, somewhere in the code?

How do i use method SPRibbon.TrimById(string id, string visibilityContext)?

Why makeTabAvailable() doesn't work?

share|improve this question

Not possible - the SPRibbon.TrimById operation is not reversible! Refelcting the method reveals that the specified id is added to a private ArrayList in the SPRibbon class. There is no corresponding SPRibbon.UntrimById method. You will need to find a way to avoid the trimming in the first place.

share|improve this answer

public void HideRibbonButton()

{ //if this is a System.Web.UI.Page

SPRibbon ribbon = SPRibbon.GetCurrent(this);



Hide Groupribbon.TrimById(“Ribbon.EditingTools.CPEditTab.EditAndCheckout”);

Check Link

share|improve this answer
I know how to hide (trim) buttons, i need to reveal them, make them visible again! – Shkipper Sep 28 '12 at 14:10

Your Answer


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.