Sign up ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have an odd problem with a SharePoint 2010 document library that uses document sets. I wanted to flatten the document sets in a grouped view to show the contents of all document sets together. I found that when I set the Folders group in the view to "Show all items without folders", the view does not display a link for the document sets. Instead it just shows the name of the document set as static text with the usual rollover context menu. The documents contained within the document sets do have links. This is strange, and the consequence is that this view cannot be used to access the document sets' welcome pages. Has anyone else encountered this and is there a workaround? Thanks.


share|improve this question

1 Answer 1

You can take a look at the View Element Schema

Where you would need to change the list view "Scope" property to "Recursive" in order to get the desired result.

SCOPE - Optional Text. Specifies the recursive scope for a view of a document library. Possible values include the following: FilesOnly—Show only the files of a specific folder. Recursive—Show all files of all folders. RecursiveAll—Show all files and all subfolders of all folders. If this attribute is not set, the view displays only the files and subfolders of a specific folder. The value of this attribute corresponds to the Scope property of the SPView class.

In C# CSOM code your method should look something like this:

    private void CreateView(string[] fields)
        var lists = _web.Lists;
        var existingLists = _context.LoadQuery(lists.Where(x => x.Title == _listName));
        var list = existingLists.FirstOrDefault();

        var viewColl = list.Views;

        // Specifies the properties used to create a new list view 
        var creationInfo = new ViewCreationInformation();  
        creationInfo.Title = "Flat View";  
        creationInfo.RowLimit = 100;
        creationInfo.ViewFields = fields;  
        creationInfo.ViewTypeKind = ViewType.None;  
        creationInfo.SetAsDefaultView = true;


        var flatView = list.Views.GetByTitle("Flat View");
        flatView.Scope = ViewScope.Recursive;

The code introduses new view in a list (not optimized for your case) and not optimized as code, but you can get the idea.

the important line is to set the scope

flatView.Scope = ViewScope.Recursive;

and then update the view.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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