The SetUp
I have created 3 site columns. All set to not required fields. I have added these site columns to a content type. This content type I have added to a document library. The document library has had a couple of extra columns added to it locally, (causing a child content type), and two of the original site columns I have made required fields. This means on the library these fields are required by in the original content type they are still not required.
The problem
When I read the field in from the list and see if it is required it still states that it isn't required. Which means it appears to be reading it from the content type not from the list. Please see my code below. Am I coding it wrong?
for (int i = 0; i < spView.ViewFields.Count; i++)
{
string fieldName = spView.ViewFields[i];
SPField field = spList.Fields.GetField(fieldName);
var isRequired = field.Required;
//Other code once found out if field is required.
}