Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > How to bind enum to a combo box using Binding class
 

How to bind enum to a combo box using Binding class

Hello,
Does anyone know how can I bind an enum to a combo box using Binding class and not by settting DataSource. I mean by setting the "combobox.Databindings.add" method.
Thanks,
JefeSol  Tuesday, September 15, 2009 4:39 PM
I have an example of using an Enum to build a dictionary and then binding the dictionary. The example uses the DataSource property, but once you have the dictionary you may be able to use the .Add method instead.

Here is the link:

http://msmvps.com/blogs/deborahk/archive/2009/07/10/enum-binding-to-the-description-attribute.aspx

Hope this helps.
www.insteptech.com ; msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
  • Marked As Answer byJefeSol Wednesday, September 16, 2009 8:41 AM
  •  
DeborahK  Tuesday, September 15, 2009 4:56 PM
I have an example of using an Enum to build a dictionary and then binding the dictionary. The example uses the DataSource property, but once you have the dictionary you may be able to use the .Add method instead.

Here is the link:

http://msmvps.com/blogs/deborahk/archive/2009/07/10/enum-binding-to-the-description-attribute.aspx

Hope this helps.
www.insteptech.com ; msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
  • Marked As Answer byJefeSol Wednesday, September 16, 2009 8:41 AM
  •  
DeborahK  Tuesday, September 15, 2009 4:56 PM
Thanks for your reply
JefeSol  Wednesday, September 16, 2009 8:42 AM

You can use google to search for other answers

Custom Search

More Threads

• Connecting to MySQL Views: Unknown SQL Type
• DataGridViewImageColumn - dynamically set images per grid row
• Bunch of Questions
• Double CurrencyManager
• DataGrid Locks Up When Scroll Bar Should be Shown
• file opener file type
• required to show records in Rows and columns in winform
• datagrid - read data from one location (non standard connection) and update SQL
• Insertion, Deletion and Updation in DataGridView
• Data Sources window & Custom Objects