DataGridViewComboBoxCell with Structured Data
Posted on 2010-08-13
I'd like to use a DataGridViewComboBoxCell with data that's a structure. I've overridden the ToString() method of the structure so that a real value appears in the list of items for my DataGridViewComboBox. Whenever I select an item from the list, I get this error:
System.ArgumentException: DataGridViewComboBoxCell value is not valid.
Is there some way I can override the value for the DataGridViewComboBoxCell so that the value that is displayed via my overridden ToString() method is what is used for the value? Or some other fix?