Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is it possible to select which views of a document library that should be available in a web part displaying the document library? This seems to partially solve the problem:

http://watsburning.blogspot.com/2011/07/dynamically-changing-views-of.html

However, I want end users to be able to select which views to be available in the web part themselves.

share|improve this question

migrated from stackoverflow.com Apr 19 '12 at 12:39

This question came from our site for professional and enthusiast programmers.

1 Answer 1

There is a drop down in the article that you've provide - that is filled with hard coded view names - user selects a view and it's shown in the webpart. So I suppose the webpart fulfill your requirement.

share|improve this answer
    
Thank you for your answer. However, the code provided above does not allow end users to choose available views for the web part themselves. I chose to inherit System.Web.UI.WebControls.WebParts.EditorPart to enable that. –  Martinfy May 8 '12 at 12:30
    
I suppose it should provide, not sure about your implementation. There is a DropDownList with ID="DropDownViews", there you should hard code (in advanced version you can get them) view names, on page_load selected view is received from the dropdown. –  Yuri Leontyev May 8 '12 at 17:58

Your Answer

 
discard

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.