This SharePoint tutorial, we will discuss how to make a field or a column of a SharePoint list as ReadOnly. You might encounter a situation where you need to make a column as read-only when the user trying to submit an item or edit an item in SharePoint 2013/2016 or SharePoint Online.
There are different ways you can make a SharePoint list column as read-only.
SPList list = web.Lists["List Name"]; SPField myField = list.Fields["Name of your List Field"]; myField.ReadOnlyField = true; myField.Update();
You may like following SharePoint tutorials:
- How to use PreSaveAction() in newform.aspx in SharePoint Online/2013/2016 List
- Different ways to show/hide SharePoint List form fields
- SharePoint modern list column formatting examples
- Hide SharePoint list columns based on user permissions
- Color Code SharePoint List Column Value based on Condition using Calculated Column
- How to hide or rename title column from SharePoint list or library
- SharePoint 2013 list column status wise Change row Color using jQuery
- SharePoint 2013/2016/Online List Column Validation Examples
- Change column ordering in list forms in SharePoint Online/2013/2016
Bhawana Rathore is a Microsoft MVP (3 times in Office Apps & Services) and a passionate SharePoint Consultant, having around 10 years of IT experience in the industry, as well as in .Net technologies. She likes to share her technical expertise in EnjoySharePoint.com and SPGuides.com