Thursday, May 10, 2012 9:32 AM
How to hide the ECB item "Edit item" from the ECB ?
i have done the same before using content editor webpart coding. But i forgot it.
Thanks in advance
Thursday, May 10, 2012 10:11 AM
Thursday, May 10, 2012 10:34 AM
first create customcore.xml file and reference in master page for this follow this link
and your customcore.xml file hide following items
//strAction = "editDocumentWithProgID2('" + currentItemFileUrl + "', '" + currentItemProgId + "', '" + currentItemOpenControl + "', '" + bIsCheckout + "', '" + a.HttpRoot + "', '" + currentItemCheckedoutToLocal + "')";
// strImagePath = a.imagesPath + currentItemIcon;
// b = CAMOpt(c, strDisplayText, strAction, strImagePath, null, 260);
// b.id = "ID_EditIn_" + currentItemAppName;
// CUIInfo(b, "EditDocument", ["EditDocument"])
follow this link
Hopefully this gives you the gist of what is required.
- Proposed As Answer by Sayyed Esubvali Thursday, May 10, 2012 10:35 AM
Friday, May 11, 2012 3:42 AM
Thaks all for your reply...
Actually i found a very simple soultion.
Just i changed "return false;" to "return true;" and the default menu items disappeared. We can give those default menu items if it is required in other pages(views) using camopt function.
Thanks a lot friends...
- Marked As Answer by Aneesh Kochukrishnan Friday, May 11, 2012 3:42 AM
Friday, July 06, 2012 3:50 AM
Can you explain the solution in more detail. Also if you know how to achieve the functionality using the content editor web part, kindly share it.
Friday, July 06, 2012 4:47 AM
did you referenced to jQuery Library? Because this is often the reason why the custom code did not work. You can reference to the newest jQuery Library like this:
I hope it helps.
Friday, July 06, 2012 4:58 AM
I have added the following code in HTML source in content editor web part and added the web part below the list web part. But it doesnt work. Am still able to see version history option in ECB(on loading as well as during the mouse hover)
Kindly let me know if i am missing anything.
Tuesday, July 10, 2012 9:44 AM
Hi rakesh try this code, it works for me on SP2010:
Pls mark as answer if it works for you. Hope it helps!
Tuesday, July 10, 2012 11:11 AM
Thanks for the code.But can we implement the same functionality when the ECB loads/opens instead of hovering over the menu items.
- Edited by M Rakesh Jain Tuesday, July 10, 2012 11:11 AM