To make a field read-only you can set on of the following column properties;
readOnly which prevents a value being entered when both inserting and editing the field,
updateReadOnly which stops the field from being updated and
insertReadOnly which stops a value from being edited when a record is being added.