0

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.

2 Answers 2

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

It will hide menu option of specified column

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

Add this CSS on the page

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

this will disable click event

1
  • 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?
    – Kay
    Commented Apr 1, 2016 at 6:34

Your Answer

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

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