Binding ComboBox with an Enumeration

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I got a simple question that, how can i bind a comboBox control with an
Enumeration.

Thanks in advance,
 
Hi Ramo,

I don't think it is possible to bind an enumeration to a combobox, but you can fill the box like this

string[] enums = Enum.GetNames(typeof(MyEnum));
foreach (string s in enums)
{
comboBox1.Items.Add(s);
}
 
Back
Top