Combobox: fast filling with enumeration values?

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

Guest

Is there a quick way to preload a ComboBox with all values of an Enumeration?
Either in VS.2005 Designer or at run time.

In my case the combobox is bound to a property of a business object.

thank you. herbert
 
MyComboBox.Items.AddRange([Enum].GetNames(GetType(MyEnumeration)))
 

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