I need to figure out how I could I selectively remove some Standard SharePoint list context menu. For example, most of the list context menus contain Edit Item, Delete Item etc. assume I have to keep the delete menu but need to strike out the “Edit Item”. How can we do that?
Go to the page settings. Add a new content editor web part into he page and go to the settings of this content editor web part. Open the source editor. Put the following scripts on it.
function Custom_AddListMenuItems(m, ctx)
var strDelete=”Delete this Item”;
var strDeleteAction=”deleteThisSelectedListItem();” ;
CAMOpt(m, strDelete, strDeleteAction, imgDelete);
// add a separator to the menu
// false means that the standard menu items should also rendered
if (! IsContextSet())
if (confirm(ctx.RecycleBinEnabled ? L_STSRecycleConfirm_Text : L_STSDelConfirm_Text))
Finally make the content editor web part invisible. Voila!