In this hint, I’ll show How to Group By ‘Content-Type’ field in SharePoint list view?Scenario:
I have a SharePoint list with two Content Type eg: Item and Announcement,
I need to display the view grouped by the Content-Type field as shown below:
I tried to modify the view.
But unfortunately, There is no field called Content Type in Group By section as shown below.Solution:
- Modify your view > In the group by section, > select any field like Title.
- Open SharePoint Designer > From the left menue > Select List & Library > Click on your List .
- In View Section, Click on your view to edit it.
- Search for a <View>.
- Scroll horizontally till get the <GroupBy> tag as shown below.
- In <FieldRef> tag, Change the Name of from Title to ContentType.
<GroupBy Collapse=”TRUE” GroupLimit=”30″><FieldRef Name=”ContentType”/></GroupBy>
- Open your view, It should be now grouped by Content type.