I've created a custom content type and a list definition and list instance based on it. In a web part, I add an SPListItem to the list, set its field values, and then call item.Update().
However, when I browse to the AllItems.aspx view of the list, the values for that item are incorrect. Two of the fields are just empty, and two have incorrect values (as if the field values got shifted somehow - the value for field #3 shows up in field #2, etc).
Here's what's frustrating, though: the values are being stored in the contentdb correctly (I think). If I open the detail view for the item, all the values shown are correct.
Why would my view be showing the wrong values? I've checked my list schema over and over for matching field names, but I just don't seem to be able to figure out what's going on.
Update: One of the fields in the content type used to define the list is a lookup column. If I remove it from the list view, the other values are rendered correctly. What's the deal with that?
Update 2: looks like having non-alphanum chars in the Name property of a Field is what's causing this. I changed the field from something like "Company.AppName - FieldName" to "Company.Appname.Fieldname", and it failed in the same way. I then changed it to "CompanyAppnameFieldname" and it worked fine.