How do i show enum values in a combo-box?

后端 未结 3 2059
说谎
说谎 2021-01-01 21:48

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

3条回答
  •  既然无缘
    2021-01-01 22:18

    Have you tried to use

    cbState.DataSource = Enum.GetNames(typeof(caseState));
    

    And when retrieving data just Parse it

提交回复
热议问题