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

I am trying to hide all ribbon tabs in my SharePoint site(check the below image).

I am using delegate control with following piece of code. The code hides ribbon tabs on all the site pages, but not list forms.

SPWeb web = SPContext.Current.Web;
if (!web.UserIsSiteAdmin)
   SPRibbon current = SPRibbon.GetCurrent(this.Page);
   if (current != null)
      current.CommandUIVisible = false;

I also tried following piece of code to see if I can hide the entire ribbon only on the list form by checking for existence of list form specific tabs, display form for example, but current.IsTabAvailable(SPRibbon.ListFormRibbonDispTabId)) returns false.

if (current.IsTabAvailable(SPRibbon.ListFormRibbonDispTabId))
  current.Visible = false;

How do I hide ribbon tabs on the list forms? Is there a way to check if the page is list form? How do I check if specific tab is available?

enter image description here

Answer : Used css to hide the ribbon.

share|improve this question
Use this script in Master page. '<script type="text/javascript"> document.getElementById("s4-ribbonrow").style.display = "none"; </script>' – suren Apr 26 '13 at 11:57
@suren s4-ribbonrow hides the full ribbon. I just want to hide tabs. Is there any way i can put this code only on list forms. – Ishan Apr 26 '13 at 12:09
Are you looking for this? [… – suren Apr 26 '13 at 12:30
The methode in the link to hide ribbon is not feasible as we have many list forms. Need the change to be at one place and reflect everywhere. – Ishan Apr 26 '13 at 12:34

Your Answer


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

Browse other questions tagged or ask your own question.