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");

1 comment:

Unknown said...

Every aspiring Web developer should know about the power of JavaScript and how it can be used to enhance the ways in which people see and interact with Web pages. Fortunately, to help us be more productive, we can use the power of JavaScript libraries, and in this article we will take a good look at jQuery in action