Custom Context Menu Item in SharePoint 2010 1


You can modify content menu of list items in SharePoint 2010. List items’ context menu is called as Edit Control Block (ECB).

  1. Create a “SharePoint Project” in Visual Studio 2010 (farm solution)
  2. Add new “Feature”.
  3. Set the scope of “Feature” according to your needs.
  4. Add new “Empty Element” to your solution.
  5. In Elements.xml file add the following <CustomAction> element. Registration type specifies when te context menu appears. Following two xml code samples define custom action for a list item and a specific file type.

 

Some notes:

  • RegistrationType possible values
    • None
    • List
    • ContentType
    • ProgId
    • FileType
  • RegistrationId specifies Edit Content Block category that the custom menu item will displayed. You can find the full list of possible RegistrationId values on Mike Smith’s blog.
  • <UrlAction> element defines the URL to a SharePoint page that will be displayed when user clicks on the custom menu item.
  • Full CustomAction Details: http://msdn.microsoft.com/en-us/library/ms460194.aspx

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

One thought on “Custom Context Menu Item in SharePoint 2010