How do i show enum values in a combo-box? The code below result in the combobox having all displayed names being \"caseHandler.cState\". I wanted it to have the actual names
The Enum
public enum Status { Active = 0, Canceled = 3 };
Setting the drop down values from it
cbStatus.DataSource = Enum.GetValues(typeof(Status));
Getting the enum from the selected item
Status status;
Enum.TryParse(cbStatus.SelectedValue.ToString(), out status);
http://amir-shenodua.blogspot.com/2012/03/net-using-enum-to-populate-combo-box.html