5

I need a different views for Folders & Files in a Document Library. I want Folders to have different columns & Files in the folders to have different columns.

Is this possible?

3 Answers 3

7

I've recently spent a fair bit of time looking into default views in SharePoint and the different options that are available. My finding are in this blog post:

http://camerondwyer.wordpress.com/2014/01/06/harness-sharepoint-default-views-at-different-navigation-hierarchy-levels-to-build-more-appealing-solutions/

1
  • 5
    Please donot provide links as answer because in future if the links breaks then your answer becomes useless. Jan 15, 2014 at 5:56
8

If all you want is to show different view at the root and inside folder then it's build in, but if you want folders and files to show up in the same view but with diffent information then that can't be done.

To create different views for root and folders do the following.

  1. Create the view to show at the root set it as default view
  2. Create the view to show inside folders set it as default view, but also down in the folders section set Show this view to In folder of content type: <Your folder content type>
  3. Go back to the root view and change Show this view to In the top-level folder
1

You can always have different views but if your requirement is clicking on a folder will change the view (for sub-folders/files), then that can be tough. If you need to show files with different set of columns then you may create a separate view with the option "Show all items without folders" and show this view to a different page. Or if you really really need a functionality that folder will have one set of columns and clicking on that folder will open a view with different set of columns then you may try one of the following approach -

  1. Create one custom web-part
  2. Use sharepoint web services (list.asmx etc.) to obtain information(folder url and all) and generate 2 different grid (kendo or jquery ui maybe) one for folder and one for files, clicking on folder will hide the folder grid and show file grid with different column
  3. create 2 different views and on the folder view add one javascript/jquery to override the click on folder to redirect to file view page with the redirecting folder in the url (/folder).

none of these are great solution but if you must do this then few approaches

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.