My Model uses the following Enum :
public enum Priority {
[Display(Name = "Niedrig")]
Low,
[Display(Name = "Normal")]
Normal,
[Display(Name = "Hoch")]
High
}
I want to show the DisplayName Attribute Value in the DropDownList.
How must this line be changed in order to achive this?
@Html.Kendo().DropDownListFor(model => model.Priority).BindTo(Enum.GetNames(typeof(Priority))).Value(Model.Priority.ToString())
public enum Priority {
[Display(Name = "Niedrig")]
Low,
[Display(Name = "Normal")]
Normal,
[Display(Name = "Hoch")]
High
}
I want to show the DisplayName Attribute Value in the DropDownList.
How must this line be changed in order to achive this?
@Html.Kendo().DropDownListFor(model => model.Priority).BindTo(Enum.GetNames(typeof(Priority))).Value(Model.Priority.ToString())