enter image description here

I want to hide/disable the open menu option next to a column (clicking on which gives us drop-down with 'Ascending', 'Descending' and filters) in list view. Can this is be achieved using JavaScript? If yes then how? Thanks.

div[displayname*="Title"] ~ .ms-core-menu-box,div[displayname*="Title"] ~ .ms-positionRelative
    display:none !important;

It will hide menu option of specified column

  • It didn't work for me. I can still click on the menu option next to the column name. – Korak Apr 2 '16 at 10:20
  • Have you checked that css is applied? Please verify column display name also. – Viraj Gorajia Apr 2 '16 at 10:23
  • Yes I have. Didn't work :( – Korak Apr 2 '16 at 10:28
  • @Korak div[displayname*="Title"] ~ .ms-core-menu-box,div[displayname*="Title"] ~ .ms-positionRelative { display:none !important; } – Rajesh Joshi Apr 2 '16 at 10:34
  • It is working in Mozilla, Chrome, IE 11,10,9. Please clear cookie and check it – Viraj Gorajia Apr 2 '16 at 10:47

Add this CSS on the page

.ms-vh2 {
    pointer-events: none !important;

this will disable click event

  • Thanks Rajesh. I will try this. But, I actually wanted to disable it for some of the columns and not all. Can I add the column name somewhere? – Korak Apr 1 '16 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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