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.

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
    Apr 2 '16 at 10:20
  • Have you checked that css is applied? Please verify column display name also. Apr 2 '16 at 10:23
  • Yes I have. Didn't work :(
    – Kay
    Apr 2 '16 at 10:28
  • @Korak div[displayname*="Title"] ~ .ms-core-menu-box,div[displayname*="Title"] ~ .ms-positionRelative { display:none !important; } Apr 2 '16 at 10:34
  • It is working in Mozilla, Chrome, IE 11,10,9. Please clear cookie and check it Apr 2 '16 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
    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.