bind dropdown to enum

  • Thread starter Thread starter John A Grandy
  • Start date Start date
comboBox1.DataSource = Enum.GetNames(typeof(MyEnum));

you can bind arraylists to a combox box, but can't use the ValueMemeber or
other related properties that you can when you bind a datatable

Vijay
 
It may be better to use .GetValues; the text should appear the same, but it
means that SelectedItem should return the enum rather than a string.

Marc
 
Back
Top