Here I find myself again wondering why certain things work and some just don't.

I was wondering how I could display the View Selector on a document library WebPart? The Site settings AllItems.aspx page of the document library has it, but it seems impossible to set it on the actual page WebPart.

Is this something that can be achieved when adding the Doc Lib WebPart or in the views that I missed? I don't want to have to copy the AllItems.aspx WebPart to each page that needs it, but if that's what it takes.

Any help would be appreciated. And no I don't want to create a new page for each view and create a dropdown selector to navigate between these pages. SharePoint has it built-in, there has to be a way to enable it for the 'frontend' WebParts too!


  • I guess I sort of found the answer to it - In SP Designer, you can just find the following first line of the webpart: <ListViewXml xmlns="schemas.microsoft.com/WebPart/v2/ListView"> And then change the Hidden="TRUE" to be DefaultView="TRUE" and update the DisplayName="" to be the name of the DefaultView you've selected.
    – TeckniX
    Feb 8, 2010 at 17:43
  • Can you go ahead and add an answer with your explanation so that it can get marked as answered? Even if it's not the answer you had hoped for, it sounds like you pretty much figured out how the viewselector works, it just doesn't worked quite the way one might hope.
    – Sam Yates
    Mar 11, 2010 at 5:29

3 Answers 3


Not sure if having the view selector is your goal or an attempt to get to your goal.

You might already know this and it may or may not apply to this question, but you can add any ListViewWebPart (the web part that displays content for lists and document libraries) to any web part page, customize the web part and configure the view used for that web part, all through the web UI.

  • 1
    Thanks - I did know that. What I didn't realize was that the view selector was a hack. It really doesn't do a true filtering of the current page, instead when you create the view, it simply creates a new page to display the information with the particular filters/groups hard-coded on the page. Thus using the 'view selector' on a page with that listViewWebpart becomes useless, when a user selects a different view, it will send them to the page copy in the backend and you lose your page layout. Once I realized this, it was clear that I needed to create a different page for each views. Thanks!
    – TeckniX
    Feb 22, 2010 at 23:03

I realized that the internal functionality of sharepoint was actually to create separate pages for the views. This is really not what I had expected, but had to work with it.


Document Library Explorer is a web part that can be used on pages instead of the standard list view web part. It is a commercial product that I have written and actively maintain.

Among many other features, it has the ability to show the view selector on the toolbar.

  • @Paul Lucas: It's fine to link to your own products provided they directly answer the question and a disclaimer is added explaining your link to the product. Can you please edit your answer with the latter? Thanks and welcome to SharePoint Overflow!
    – Alex Angas
    Mar 14, 2010 at 1:51
  • Thanks Paul - Unfortunately I'm not at liberty to install 3rd party tools and thus was trying to find the correct sharepoint solution - I'll check out your product though to get an idea of how you did it :)
    – TeckniX
    Mar 15, 2010 at 18:04

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.