Welcome! I'm a Microsoft Certified Trainer (MCT) specializing in SharePoint, .Net, SQL Server and related technologies. I'm a Senior Instructor for MAX Technical Training (Cincinnati area).

Looking for a SharePoint user group? Cincinnati SharePoint User Group

6/24/2009

SharePoint: Removing Group Headings from a View’s Group By

 

When you use grouping in list views SharePoint adds the somewhat redundant field name over and over again for each group heading.

image

Often the group field is pretty obvious. We really don’t need to see Color, Color, Color.

 

To fix this requires SharePoint Designer…

  1. Create the grouped view in the browser as usual
  2. Open the site in SharePoint Designer
  3. Find the view file: “yourname.aspx”
  4. Double-click the file to open it for editing
  5. Display the Code view of the file
  6. Search for GroupByField
  7. Delete all of this text:
    <GetVar Name="GroupByField" HTMLEncode="TRUE"/><HTML><![CDATA[</a> : ]]></HTML>
  8. Display the Design view and confirm that the change is what you wanted.
  9. Save the file
  10. Test in the site in the browser

Notes:

  • Make sure you get all of the text above, and no more.
  • This will remove all group by headings in the view. You can’t remove just one level.
  • Using SharePoint Designer is always at your own risk!  :-)
  • Remember that you can always right-click an edited file in the folder list and select “Reset to site definition” to undo all of your changes.
  • And finally, this is just a view. You can always delete it are start over.

 

The result should look like this:

image

 

.

2 comments:

David said...

I did a global search on the view page for the "GroupByField" field that you reference but I'm not able to find any references to it.

Mike Smith said...

David,

Did you setup a view with grouping, then do the search from within the Code view of the page (the grouped view) in SharePoint Designer? The GroupByField will not show up in the source of the page delivered to the browser.

Mike



... ---