Hiding SharePoint Lists

Sometimes we do feel a need to hide SharePoint Lists. Following are few ways which could some in handy while trying to achieve this objective.
Using SharePoint Designer:

  1. Start SharePoint Designer and open your site.
  2. Click on the “Lists and Libraries” in the Navigation pane
  3. Select the list/library which you need to hide
  4. On the details page check the “Hide from browser” checkbox and save
  5. To unhide the list un-check the checkbox and save 
sharepoint designer
SharePoint Designer

Using Code:
The other way is to obviously do this through code. SPList has a property as Hidden which can be set to true or false

using (SPSite site = new SPSite("http://YourSiteUrl"))
                    using (SPWeb web = site.OpenWeb())
                        SPList list = web.Lists["Announcements"];
                        //Set this property to true or false accordingly
                        list.Hidden = false;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.