group by more than 2 columns sharepoint 2013

Advertisement
In this article we will explain, how to create multi level group by more than two columns.
We are having a list with name “RajamouliFilmography”, now we want to create multi-level hierarchy “Group By “with more than 2 levels.

In OOTB it’s not possible to create more than 2 levels of Group by, but using SP Designer we can achieve this functionally.


Open the Site in SharePoint Designer

Click on Site Pages->In the Top click on web part page->select any page layout ->Enter the Page name.

Now click on the Page->Edit the file.
We placed the cursor inside the Zone Template, but Data View is in disabled.
In SharePoint 2013 we cannot add the Data View directly.
To enable Data View we have to convert the page in to HTML, for that click on the Parse HTML as shown in the below screen shot.
Again navigate to INSERT tab, there we can able to see the Data View is enabled stage, place the cursor inside the Zone Template, and click on Empty Data View.
Once we added the Empty Data View, in-between the Data Sources tag add the List.
Once we added the list, in the right hand we can able to see the Data Source Details.
Press Ctrl tab and select the columns that you want to give Group By, then click on Insert Selected Fields ->Click on Multiple Item View.
In the Option Tab Click on Sort & Group, it will pop a window, there we have to select the Fields and click on add that you want to give Group by
We added the fields in an order that we want to create group by Year, Film, and Hero Name, Select the Check box option for all the fields Show group header.
Click on Ok.
Save the page and then click on preview browser.
Now we can able to see the more than 2 levels of hierarchy structure.



Please let me know if anyone having quires on this article.

SharePoint Online  Training Contact: sharepointtraining@dotnetsharepoint.com
Advertisements
SHARE

Lakshmi Tulasi Jasti

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

28 comments:

  1. First of all, thank you for doing this post. I have been looking for this for a long time.
    I was able to follow every steps in the post. But the preview gave me a blank page. I thought that may be I did not add enough columns. I did another page and add all the columns into the page without group by and still got a blank page. Any advice please?

    ReplyDelete
    Replies
    1. try to add in another web part zone,it will work

      Delete
    2. Everything worked well :)

      You have to be carful where you put The Cursor. The Cursor must be inside the Zone Template, and then you click on the Parse HTML. See below.

      Most the time the line will be hidden. Look for this line (Please note that I have removed the characters in between words.) See below:

      WebPartPages WebPartZone runat server Title loc:LeftColumn ID LeftColumn FrameType TitleBarOnly
      ZoneTemplate

      XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      The Cursor must be inside
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      ZoneTemplate WebPartPages:WebPartZone td
      td id invisibleIfEmpty name invisibleIfEmpty valign= top height=100

      Hopefully will work with you.

      Delete
  2. When it do this, it's not displaying the files as clickable. In fact, on the list, it's only displaying the 3 columns i had indicated. advise?

    ReplyDelete
    Replies
    1. I'm trying to create a view for my document library.

      Delete
    2. Writer left out crucial part, go to web part tab, then name it and go to the right and click "To Site Gallery"

      Delete
  3. I have a blank page even if I add another web part zone

    ReplyDelete
    Replies
    1. Please check weather webpart zone is visible or not

      Delete
    2. Hi,

      Even though I add just a web part without any grouping, the page is still blank. So I guess the web part cannot be added onto the page using designer?

      Delete
    3. I had a blank page as well. Then I saw a tag in the page: [div class="ms-hide"]. I edited the aspx file in advanced mode, so I could replace this tag with a simple [div]. That solved my issue.

      Delete
    4. Thank you! The [div class="ms-hide"]was my problem. As soon as is changed that to [div] my page displayed correctly. It is not pretty but at least it groups correctly.

      Delete
  4. We have been trying to follow this tutorial step by step but we always get blank page and the view dissapears from sharepoint online. Has anybody ben able to make it work ?

    ReplyDelete
  5. Some times it happen's to me also, try multiple times.

    ReplyDelete
  6. does this solution works for sharepoint online ( office 365 ).

    ReplyDelete
  7. To all who say it don't works.....it works but you have to be very very carefull in which row you enter the data view and the data connection!!! Look at the red Cursor in the screenshot...

    ReplyDelete
  8. Thanks for the post. Its really helpful

    ReplyDelete
  9. I have tried so many times, only blank page seems to be open..

    ReplyDelete
  10. I have implemented your solution but i am having an issue here.. When I Open the first group all the groups under it are already expanded. I have used the property Collapse Group By Default but it does not seem to work properly. Although all the Sub Groups have + sign with them as they are not expanded yet but they are

    ReplyDelete
    Replies
    1. i have the same issue

      cant see to fix it either. Very Annoying

      Delete
    2. I have the same issue. Is there any solution?

      Delete
  11. Can this list be edited from SharePoint Site??? Or this is a read Only?

    ReplyDelete
  12. I am on SP2013. When I click "Parse HTML", nothing seems to change and the Data View option is still not available. Any idea why? (Am sure I placed cursor in between the ZoneTemplate...

    ReplyDelete
  13. can you post the XSLT code in the page once you selected 4 columns. i always get one columns in group by. I am using SharePoint 2013












    ReplyDelete
  14. how can we change the row limit upto 100? as the sharepoint site will throw an error when we change the row limit above 30

    ReplyDelete
    Replies
    1. I set my row limit by clicking on the "Paging" dropdown in the "Data View Tools" in SharePoint Designer and selecting "More Paging Options". Then I just put 200 in the "Display items in sets of this size:" and click OK. Works perfectly for me.

      Delete
  15. Is there a way to make the rows clickable?

    ReplyDelete
  16. is it working with sharepoint online??

    ReplyDelete
  17. Hi,
    Nice tutorial, but I'm not having the expected result. Just have one of the three groups, and as I created this with a document Library, I can't see the documents and click on them to open them... despite the fact I selected all the columns I wanted to be shown...

    ReplyDelete