Remove “Send To” from ECB Menu

I faced a situation where I need to remove the Send To menu item from the ECB menu. I binged (Search using Bing) and found lot of blog post to remove the items from the ECB. Most of them are suggesting to have a copy of Core.js and remove the menu items in the new version of renamed core.js file. Refer the new copied version of core.js in the master page.

I found another way of doing this by adding the below line of script to a content editor web part in the item list page or in master page.

function AddSendSubMenu(m,ctx){ return false;}

Comments

  1. public override void ItemDeleting(SPItemEventProperties properties)
    {
    if (properties.ListItemId == 0)
    {

    using (SPWeb web = properties.OpenWeb())
    {
    SPList list = web.Lists[properties.ListId];

    if (list.ItemCount!=0)
    {
    properties.Cancel = true;
    properties.ErrorMessage = "Library not empty";
    }
    }

    }

    }

    ReplyDelete
  2. function Custom_AddDocLibMenuItems(m, ctx)
    {
    var strDisplayText = "Say Hello rjesh!";
    var strAction = "alert('Hello Rjesh')";
    var strImagePath = "";

    // Add our new menu item

    CAMOpt(m, strDisplayText, strAction, strImagePath);

    // add a separator to the menu
    CAMSep(m);
    return false;
    }

    ReplyDelete
  3. http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

    http://www.hanselman.com/blog/CommentView.aspx?guid=91da8c0a-537e-4bbf-abac-c6652dee7057

    http://cheeso.members.winisp.net/IirfHelp/frames.htm

    ReplyDelete
  4. Hi Rajesh,

    Please help me as i want to hide "check in" option from edit properties, this is when we upload the document to the library and if you make any one of the columns make it "Required column". we will get check in button in edit properties. this check in option i want to hide(while uploading only). Please help me sir. please provide me JAVASCRIPT not c# code as i do not have access to VS2010.

    ReplyDelete

Post a Comment