Saturday, June 9, 2012

How to hide view in SharePoint 2010

Here I will hide the one of view which get from the existing List in SharePoint. India_orders is the view ,get from the orders list then hide ursing hidden property of view
SPsite ss = SPcontext.Current.Site;
Spweb sw = SPContext.Current.Web;
SPList sl = sw.Lists["Order"];
SPView Indview = sl.Views["India_orders"];
Indview.Hidden = true;
Console.Writeline("Hide the desired View");

Post a Comment