Blog Archive

Friday, August 10, 2012

Adding a Context Menu to Different Column in List View

There are situations in which List View Web Part in SharePoint 2010 is very handy. When we insert the SharePoint 2010 List View Web Part on the page then  by default it will add certain columns of the list. Normally Title column has Context Menu for the List Item but what if we want to have that context Menu on some different column and here is our solution.

We can have Context Menu on some different column in the List View Web part. We can do it by using the small change in the FieldRef column in the list view web part. Add ListItemMenu and LinkToItem Attributes to the desired Field and set the value as 'True' for them.


<FieldRef Name="Name" ListItemMenu="TRUE" LinkToItem="TRUE" />

No comments:

Post a Comment