SPField.Hidden Property (Microsoft.SharePoint)
Gets or sets a Boolean value that specifies whether the field is displayed in the list.

Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Syntax

Visual Basic (Declaration)
Public Property Hidden As Boolean
Visual Basic (Usage)
Dim instance As SPField
Dim value As Boolean

value = instance.Hidden

instance.Hidden = value
C#
public bool Hidden { get; set; }

Property Value

true if the field is hidden; otherwise, false.
See Also



Community Content

Rafelo
Application Page to change the Hidden property of a SharePoint List (SPList) or Field (SPField)

I've developed a custom application page that allows a site administrators to toggle the Hidden Property of any SharePoint List of Field. The page displays all the lists and fields in the site regardless of their hidden status. The code sample and a link to the downloadable page can be found at http://blog.rafelo.com/2008/06/exposing-and-creating-hidden-sharepoint.html. I hope it helps. Any feedback is appreciated

Rafelo
http://blog.rafelo.com/


Thomas Lee
You will get an Exception if...

Before ANY updates to this property, make sure you test for the property CanToggleHidden.
If you try to update this property AND CanToogleHidden returns false you will receive an exception.

Here's a safe way to go about:

SPField field = myList.Fields[myFieldId];
if (field.CanToggleHidden)
{
field.Hidden = true;
field.Update();
}




Edge
www.superedge.net


Page view tracker