How to create read-only column in Sha开发者_JAVA百科rePoint2010 use SP Designer or from SP Portal?
I have seen nothing the UI or the Designer to make a read only field in a list. There are a couple of ways to do this through code.
You can create the field in the list definition in a SharePoint project and set the Read Only value to true. Article that shows how this works.
You can also set it in code in a Feature Activated method for example.
SPField f = new SPField(TaskList.Fields, "MyReadOnlyField");
f.ReadOnlyField = true;
f.Update();
精彩评论