Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In SharePoint Designer 2010, if one removes one of the default forms (say "EditForm.aspx"), how does he also remove the "Edit" option from the List Item Menu? The default forms are not represented in the "Custom Actions" pane when looking at the form settings page in SharePoint Designer.

share|improve this question
    
If you are trying to stop user from editing your list items, there may be better ways to do it. For example, if there is no write access to your list, the edit button will be disabled automatically. Does that work for you? –  Ashish Patel Oct 23 '10 at 22:02
    
Thanks for the reply. Actually that is not what we are trying to accomplish. The user can edit, we just have a custom page that has additional functionality on it so I want to hide the default one. –  Rob Wilson Oct 23 '10 at 23:20

2 Answers 2

up vote 2 down vote accepted

I was going to say use HideCustomAction, but apparently it doesnt work with the EditControlBlock.

http://msdn.microsoft.com/en-us/library/ms414790.aspx

http://msdn.microsoft.com/en-us/library/bb802730.aspx

So i think you have to hide it with javascript

http://techtrainingnotes.blogspot.com/2008/02/sharepoint-hiding-menus-not-using.html

Or you can hack some system javascript files (and put your sharepoint into an unsupported state) and get HideCustomAction to work.

http://www.helloitsliam.com/Lists/Posts/Post.aspx?ID=57

share|improve this answer

If you know the text content of the item, you could remove it via CSS.

Example:

.ms-core-menu-link[title="Compliance Details"],
.ms-core-menu-link[title="Workflows"],
.ms-core-menu-link[title="View Workflow History"],
.ms-core-menu-link[title="Schedule Workflows"],
.ms-core-menu-link[title="Alert me"],
.ms-core-menu-link[title="Shared With"] {
    display: none;
}

Of course its also possible to add this css dynamically via JavaScript to the document.head, e.g. based on the users permissions.

Notice:

  • Think of the possibility of different languages
  • It's better than other JavaScript-Only-Ways, because if the css is in the site, it always work. No need for listening a menu open event or something
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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