SharePoint: Make a list field hidden programmatically

Posted by vitule on Stack Overflow See other posts from Stack Overflow or by vitule
Published on 2008-11-14T14:58:29Z Indexed on 2010/04/23 13:13 UTC
Read the original article Hit count: 270

Filed under:

I'm trying to hide the "Title" field in a list. This doesn't seem to work:

SPList myList;
...
SPField titleField = myList.Fields.GetField("Title");
//titleField.PushChangesToLists = true; <-- doesn't seem to make a difference
titleField.ShowInEditForm = false;
titleField.ShowInDisplayForm = false;
titleField.ShowInNewForm = false;
titleField.Update();
//myList.Update(); <-- make no difference

What am I doing wrong?

© Stack Overflow or respective owner

Related posts about sharepoint