How to remove the ribbon tabs in list forms in SharePoint 2010
2012-01-08 22:34
681 查看
By Vijai Anand April 25, 2011 |
I have a custom list and items are added to that.
When you view the item the display form looks like the following which has two groups "Manage" and "Actions" and each group has few tabs.
![](http://www.c-sharpcorner.com/UploadFile/anavijai/how-to-remove-the-ribbon-tabs-in-list-forms-in-sharepoint-2010/Images/RibbonShare1.gif)
Here we will be seeing how to remove the tabs and the group from the ribbon interface in the list display form.
Steps Involved:
Open Visual Studio 2010.
Go to File => New => Project.
Select Empty SharePoint Project template from the installed templates.
![](http://www.c-sharpcorner.com/UploadFile/anavijai/how-to-remove-the-ribbon-tabs-in-list-forms-in-sharepoint-2010/Images/RibbonShare2.gif)
Enter the Name for the project and click on Add.
Right click on the solution =>Add => New item.
Select Empty Element template from the installed templates.
![](http://www.c-sharpcorner.com/UploadFile/anavijai/how-to-remove-the-ribbon-tabs-in-list-forms-in-sharepoint-2010/Images/RibbonShare3.gif)
My entire solution looks like the following.
![](http://www.c-sharpcorner.com/UploadFile/anavijai/how-to-remove-the-ribbon-tabs-in-list-forms-in-sharepoint-2010/Images/RibbonShare4.gif)
Replace Elements.xml with the following code.
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="RemoveTabEditItem"
Location="CommandUI.Ribbon"
RegistrationId="100"
RegistrationType="List">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition
Location="Ribbon.ListForm.Display.Manage.EditItem" />
</CommandUIDefinitions>
</CommandUIExtension>
</CustomAction>
<CustomAction
Id="RemoveGroupActions"
Location="CommandUI.Ribbon"
RegistrationId="100"
RegistrationType="List">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition
Location="Ribbon.ListForm.Display.Actions" />
</CommandUIDefinitions>
</CommandUIExtension>
</CustomAction>
</Elements>
Removing the Edit Item Tab: Location - Ribbon.ListForm.Display.Manage.EditItem
![](http://www.c-sharpcorner.com/UploadFile/anavijai/how-to-remove-the-ribbon-tabs-in-list-forms-in-sharepoint-2010/Images/RibbonShare5.gif)
Removing the Actions group: Location - Ribbon.ListForm.Display.Actions
![](http://www.c-sharpcorner.com/UploadFile/anavijai/how-to-remove-the-ribbon-tabs-in-list-forms-in-sharepoint-2010/Images/RibbonShare6.gif)
For Default Server Ribbon Customization Locations refer http://msdn.microsoft.com/en-us/library/ee537543.aspx.
相关文章推荐
- Adding Custom Actions to the List Item Menu in SharePoint 2010 Using SharePoint Designer 2010[Sharepoint中添加自定义菜单]
- 转:How to submit the rows of a repeating table in InfoPath to a SharePoint list
- [转]如何删除放置库(How to Delete the Drop Off Library)in SharePoint 2010
- How to hide my site and my document link in the right-top corner of sharepoint 2010
- How to open MS word document from the SharePoint 2010 using Microsoft.Office.Interop.dll
- How to: Hide the Ribbon in SharePoint 2010
- How to use document library in Sharepoint 2010
- How to delete a large number of data in SharePoint for List when refreshing data?
- How to Setup Load Balance in SharePoint 2010 Farm
- How to Modify the web.config file in SharePoint using SPWebConfigModification?
- 【转】How to install and configure SharePoint Server 2010 SP1 on the existing SP 2010 Farm
- Custom Ribbon in SharePoint 2010 & which not wrok when migrate from 2010 to 2013
- Create custom Task List and Forms in SharePoint 2010 with Visual Studio 2012
- How to unlock the locked tasks in Sharepoint Workflow
- How to Create Multilingual Webpart in SharePoint 2010 (C# 方式)
- How to Create Multilingual Webpart in SharePoint 2010? Use Localization in Globalization.
- Use Microsoft SharePoint Designer 2010 to customize the list view 1
- Use Microsoft SharePoint Designer 2010 to customize the list view 3---Parameter and Filter
- How to: Hide the Ribbon in SharePoint 2010
- Use Microsoft SharePoint Designer 2010 to customize the list view 2