Hi,
I have a datagridview bound to a List of objects (ObjectA). Each ObjectA
contains an ObjectB property.
Class ObjectA
{
public ObjectB objB {}
}
The datagridview has a combobox column that is bound to each ObjectA's
ObjectB, like this:
List<ObjectA> ObjectAList = new List<ObjectA>();
....
dgv.DataSource = ObjectAList;
dgv.Columns[1].DataPropertyName = "objB";
When the datagridview loads, I get an error in the form of a message box for
each row that loads:
The following exception occurred in the DataGridView:
System.FormatException: DataGridViewComboBoxCell value is not valid.
The comboboxes all load with the right values, but this error appears as
they load and whenever the datagridview is clicked.
Does anyone know what would cause this behavior?