开发者

Create read-only column in SharePoint 2010

开发者 https://www.devze.com 2023-03-21 18:34 出处:网络
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 w

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();
0

精彩评论

暂无评论...
验证码 换一张
取 消