10

I created a new list view with style = 'Boxed' in SP2013. The problem is that this view is showing the columns header in the top when there's no need to do it. So, how can I remove or hide it? I tried associating a js file where I'm loading jQuery and doing the following:

$('.ms-listviewtable tr th').hide();

But if after loading jQuery, the Boxed style doesn't work anymore. Any ideas?

  • i checked and it's working fine.. i think your javascript loads before. try to apply delay to your javascript and check... – Hitesh Chandegara Dec 23 '13 at 13:17
  • It didn't work for me. I'm executing the command after loading jQuery, but when the jQuery script has been loaded the boxed style doesn't work anymore, strange isn't it? – Carolina Bauque Dec 24 '13 at 10:47
  • yes, you can also hide by applying css... – Hitesh Chandegara Dec 24 '13 at 10:52
12

Probably the most simple way to hide View header would be to use CSS

1 Add Content Editor web part on View page (located under Media & Content category)

2 Insert the following code into Content

<style type="text/css">
    .ms-viewheadertr { display:none; }
</style>

enter image description here

|improve this answer|||||
  • 1
    Works like a charm! :D – Carolina Bauque Dec 24 '13 at 10:49
  • Glad to know :) – Vadim Gremyachev Dec 24 '13 at 11:50
  • 1
    That worked perfectly for my SP2013 list in boxed view! I don't get why Microsoft took the split view/edit capability out of SP Designer 2013... - Thanks!!! – user31782 Jul 22 '14 at 16:02
  • Works like a charm until I publish the page, <style type="text/css"> .ms-viewheadertr { display:none; } </style> After publishing it looks like.... <style type="text/css"> <span id="ms-rterangecursor-start"> </span> <span id="ms-rterangecursor-end"></span> tr.ms-{;} </style><span id="ms-rterangecursor-start"></span> <span id="ms-rterangecursor-end"></span> – Marcel Marnix Aug 19 '14 at 10:26
  • Wonderful! Be sure to use a good Title for the Content Editor web part that houses your CSS in the HTML source - or months later when you return to this webpart, and see no content in the CE, you'll wonder why it's there and perhaps delete it. Set the title to something like: Edit HTML Source CSS to Hide Column Headers and then set the Chrome Type to none in the Web Part's Appearance settings. The title will show when you are in web-part edit mode, but not in display mode, so nobody else will see it but you. – bgmCoder Dec 21 '17 at 3:37
3

To hide specific WebPart's column headers

#WebPartWPQ6 .ms-viewheadertr
  {
   display: none;
   }

.... where replace WebPartWPQn with your web part ID.

|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged or ask your own question.