I add a new column to a SharePoint list (the list is built on a content type) like this:
SPField textfield = list.Fields.CreateNewField(SPFieldType.Text.ToString(), "new column");
list.Fields.Add(textfield);
list.Update();
//the new field must be editable!
SPField newField = list.Fields["new column"];
newField.ShowInEditForm = true;
newField.ShowInViewForms = true;
newField.ShowInDisplayForm = true;
newField.ShowInNewForm = true;
newField.Update();
//update the view
SPView view = list.DefaultView;
view.ViewFields.Add(language);
view.Update();
The new column appears in the default view of the list and everything appears to work just fine. However, when I try to add a new item or edit an existing item, my new column doesn't appear in the form. A quick look in PowerShell reveals that "CanBeShowInEditForm" is set to true. What am I missing here?