Show Hide SharePoint Columns Programmatically

SPList rList = myweb.Lists[this.List.Title];

SPField field = rList.Fields["SubSites"];

Type type = field.GetType();

MethodInfo mi = type.GetMethod("SetFieldBoolValue", BindingFlags.NonPublic | BindingFlags.Instance);

mi.Invoke(field, new object[] { "Hidden", false });
mi.Invoke(field, new object[] { "CanToggleHidden", true });


Related Post

1 thought on “Show Hide SharePoint Columns Programmatically

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.