Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

How to add "Title field with link to Edit Menu" to a View using code-behind C#?

$
0
0

Hello, 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!


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>