1

I created a custom view for a Birthday Calendar, inserted a web part (apps - calendar) and changed the selected view in the web part to the custom view. Toolbar type is set to No Toolbar and Chrome Type is none. The web part shows custom list column names.

enter image description here

How would I remove/hide SortDay and Title column names from the web part view?

2
  • I think it is not possible directly using SharePoint OOTB functionalities... Try changing Style in View settings if that works else you have to write custom javascript to hide it. Jul 17, 2020 at 15:21
  • Changing style in view settings did not help.
    – C1TonyB
    Jul 21, 2020 at 20:27

2 Answers 2

1

You could use the below Jquery to hide the list column from the web part view:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript"> 
$(document).ready(function() {

$("tr.ms-viewheadertr").hide()

});
</script>

CSS:

<style> 
.ms-viewheadertr { 
display: none  !important;
} 
</style>
6
  • Not sure where I add the script? I tried embedding and adding to content script editor but that didn't work.
    – C1TonyB
    Jul 21, 2020 at 20:26
  • I inserted a content script editor and embedded the following which removes SortDay and Title until I click save and then the titles reappear. <style> .ms-viewheadertr { display: none;} </style>
    – C1TonyB
    Jul 21, 2020 at 21:20
  • You could insert script editor web part to add the script. Jul 22, 2020 at 2:43
  • In you css style, try to add !important. I have updated my answer, check if it works for you. Jul 22, 2020 at 2:43
  • I added the following to my css file and all webpart titles are gone. .ms-viewheadertr { display: none !important; } How can I limit this to specific webparts? Some webparts require titles appearing and some do not.
    – C1TonyB
    Jul 22, 2020 at 12:46
-1

Actually there's no need for an additional js scripts/css, I believe hiding / unchecking the extra metadata (SortDay,Title) from your created custom view (you can uncheck it when you go to the list settings then click on your custom list view) and resetting the webpart after (select the updated view again from the webpart configuration page) then click on apply button then refresh the page will do this easily.

btw, I'm assuming this is Classic sharepoint, let me know if its not.

Hope this helps! Happy SharePointing!

1
  • Don't I need to check the columns in the custom view so the information is displayed? Yes. This is classic SharePoint.
    – C1TonyB
    Jul 21, 2020 at 20:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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