Just like SharePoint 2010 it is not possible with SharePoint 2013 to create a view with a ‘group by’ or ‘sort’ for the content type column with the help of the the user interface. Fortunately we can create the ‘group by’ content type view with the help of SharePoint Designer and a bit of code. Sorting the view on content type is not possible with this solution. When using this solution be aware of the following downside. When the view is modified through code, you should no longer edit the view through the user interface. When you edit the view through the user interface the code will be removed automatically.
Solution
1. Create through the user interface the view you need.
2. Set the Group By on the column Created.
3. Save the view.
4. Open the view with SharePoint designer in the advanced mode.
5. Find the following code.
<GroupBy Collapse="TRUE" GroupLimit="30"><FieldRef Name="Created"/></GroupBy>
6. Change Created into ContentType
8. Save the changes.
Inhoudstype is dutch for Contenttype.
This saved me – I can’t seem to get the sort to work, though, when grouping by content type.
That is correct the sorting by view does not work.
Thanks for posting this amazing and easy solution!
Awesome, very easy and useful!
Really useful and easy to get working.
Great website! I am loving it!! Will be back later to read some more. I am taking your feeds also eabebakefefe
You have brought up a very excellent details , regards for the post. ckdcaegfbged
Fact that if you modify again the View is killing the change made from Sharepoint Designer is a NO GO for me.
However there is another way to do it. Create a Site Column at the ContentType level, name it “Content Type Label” for instance, choose a Choice column. Set the the Content Type Name in the choice list and default value.
And edit again the Content Type column created and choose to set this column as hidden (so user can’t modify it at creation of new items within this content type). And then you can create your grouping using that “Content Type Label” column without fearing that anyone attempting to modify the view will remove the Sharepoint Designer trick.
Not that doesn’t work. I can’t set a different default value for each of the inherited Content Types….
Ben, thank you very much for posting your great solution ! It works for my SP 2013 list with many custom content types !