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?

2 Answers 2


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.


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


  • I know how to hide (trim) buttons, i need to reveal them, make them visible again!
    – Shkipper
    Commented Sep 28, 2012 at 14:10

Your Answer

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

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