Binding DataGridView to DataTable with ComboBox not working
问题 I'm trying to create a DataGridView bound to a DataTable where one column is a ComboBox. The code runs but I get the following error after binding (not when data is bound): System.ArgumentException: DataGridViewComboBoxCell value is not valid. In the DataGridView one of the columns is a DataGridViewComboBoxColumn that uses an enum (named structureType) as it's source: // ColumnStructure // this.ColumnStructure.ValueType = typeof(structureType); this.ColumnStructure.DataSource = Enum.GetValues