I found that sometimes I don’t want to see the column headers on a SharePoint list. I ran into such an instance when I was putting together a FAQ which was implemented as a Custom List in SharePoint 2010. I create a view that grouped my FAQs by the Topic field. SharePoint give a fairly nice view, but in this case I think the column headers are a bit confusing to the end users.
It makes even more sense, if you don’t have tabular data for each row or two up in my case.
The the goal here, is to remove the column header (denoted by the red arrows) so that the page looks something more like this:
To do this you will need SharePoint Designer 2010 (Freely available from Microsoft). Once you have SharePoint Designer 2010 installed (you may need to restart before it will open the page properly) follow the steps below.
- Add the list to a page as a web part. In this case, my list is called FAQ List, so I added there was a web part of type FAQ List.
- Go to Site Actions | Edit In SharePoint Designer. The page will load in SharePoint Designer 2010.
- Click one of column headers. You will notice that the Table ribbon is now available.
- Click the Select button | Select Table button.
- On the same ribbon, there is a Shading button. Click it and choose a color (for example red). This will change the background of the headers to red. This works because the headers are actually in nested table. By changing the background of the table, we force the html for that table to be generated so that it can be extended.
- Find the style="background-color: #FF0000" (assuming you chose red).
- Change the style attribute to be style=”display:none;”. This will cause it to still be sent to the browser, but it will ignore it. Notice, the background-color is not set anymore, but it doesn’t hurt anything because the table is not displayed and does not take up the height and width it did on the page either. It is effectively gone from the users view now.
- Save your changes in SharePoint Designer 2010 and refresh the page in the browser to see verify that your goal was accomplished.
What not to do