Dynamically Changing Views of Sharepoint 2010 Lists or Libraries Web Part










A part from SharePoint out of the box features, developers may have requirments from clients which needs some extra efforts. As the title of this post explains the main objective, so I will be focusing on showing how to do this.


Just to give a backgroud  Web Parts for List or Libraries in SharePoint 2010 can be easily used and edited within browsers. One can easily change properties like selecting a different view to be shown in Web Part. The only problem in doing so is that you have to edit the page and then edit the web part each time you need to change or select the list view. This is a bit difficult for end users. So, You need to enable an option for the users to select different view within web part without editing it. To cater this issue you need to write custom webpart and then deploy it to your sharepoint site. Following is the step by step tutorial to do it.