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);
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top