The following code demonstrates how to show the enumerated values in ComboBox in DataGridView:
Code: private void UIDlg_Load(object sender, EventArgs e)
{
string[] enums = Enum.GetNames(...);
List<DictionaryEntry> items = new List<DictionaryEntry>();
foreach (string str in enums)
{
items.Add(new DictionaryEntry(items.Count, str));
}
comboBoxColumn.DataSource = items;
comboBoxColumn.ValueMember = "Key";
comboBoxColumn.DisplayMember = "Value";
this.myTableAdapter.Fill(this.dataSet.table, ...);
}
Related: troubleshooting -
system.argumentexception: DataGridViewComboBoxCell value is not valid