How can we switch views of the list which is created on visual studio? SharePoint designer solution or code solution?


If you have created a List Definition from visual studio you can open the Schema.xml and modify the views, this Msdn documentation shows you how: http://msdn.microsoft.com/en-us/library/ms459356(v=office.14).aspx

It is also possible modify views directly in the GUI : http://office.microsoft.com/en-us/sharepoint-foundation-help/create-modify-or-delete-a-view-HA010377693.aspx

If you are talking about showing a control for changing views in the GUI you should get that control OOTB when you add a list view web part, otherwise look in to the list view selector control: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.listviewselector.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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