When you work with SharePoint Lists you may have noticed that you will get a small context menu for each list item. Usually this content menu show up in the first column. (Title or Name column). But recently I had a requirement to show this context menu for a Person (User Presence) column.
While I was wondering how to enable this option, I tried different methods to achieve this requirement. There is no way to enable this context menu from browser. (No UI option given to edit this). Because it failed from the browser I moved to SharePoint designer and tried to achieve this. When searching through internet I found that you can enable this option from SharePoint Designer.
Steps to Enable Context Menu from SharePoint Designer:
1) Navigate to the List that you have to do the customization.
2) Select the Modify View Option and then select Modify in SharePoint Designer.
(this will open up the list view in SharePoint Designer)
3) Select the Column that you need to add the context menu, then you will get a small > symbol indicating more options available.
4) Select the Check Box “Show List Item Menu”.
5) Save and now view the list from the browser.
You will see the context menu in the desired column.
So what next. This Context Menu switch involved lot of manual steps. Is there any way to do this context menu switch from the Schema.xml file. (The file that holds the definition for a SharePoint List). That was my next question. So what I did was I saved this list as a template and then viewed the manifest file to check what changes has happened to the columns because of SharePoint Designer modifications.
While inspecting it showed up that we need to set this ListItemMenu attribute for the required field to “TRUE”. (The modification should be done to the FieldRef that is in Default View of the list)
I had spent about 1 and 1/2 day to figure how to enable this option. You usually miss this “ListItemMenu” attribute because it does not show up in the VS intellisense menu.