c# - How do I display Enum Properties in a Dropdownlist? -
i'm making simple custom control , have dropdownlist
of defined custom properties , i'm perplexed why code below fails display enum
in properties list of combobox.
how display enum
values in dropdownlist?
public partial class mycombobox : combobox { public enum multipliers { b = 1, kb = 2, mb = 10, gb = 20, tb = 30 } { get; set; } public string supertype { get; set; } public bool global { get; set; } }
you're not showing code relating how you're putting enum values actual display list. have point combobox @ enum datasource (technically have point @ call enum.getvalues(typeof(multipliers))
), or manually manipulate items collection, values list.
Comments
Post a Comment