0

all

I am trying to attempt adding Title with Edit Menu in SharePoint 2013 through code-behind. However, I am unable to do so. Below is my syntax I am using:

StringCollection strViewFields = new StringCollection();
strViewFields.Add("Title");

list.Views.Add("Custom View", strViewFields, String.Empty,
                100, true, false, SPViewCollection.SPViewType.Html, false);

list.Update();

However, the results is that Title field in my view is just a basic text! I want to have what is like in the default which has in the right-side an edit menu (triple dots it looks like). I've tried to look here: http://blogs.msdn.com/b/michael_yeager/archive/2008/11/03/reference-list-for-internal-field-names.aspx

And I tried to use the "LinkTitle" .. I've successfully used the "Edit" but it looks different, it has a pencil and paper image compared to the default.

Any help?

Thanks!

1 Answer 1

3

Have you tried using the field LinkFileName? Basically you are looking for a field in the list that has the ListItemMenu property set to true and add that fields to your view. I hope I understood your question correctly.

1
  • Perfect! Exactly what I was looking for! Thanks a lot! Commented Jul 4, 2013 at 1:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.