I want to use the telerik DropDownList to display a list of objects. I saw that the DropDownList support also an optional label but it seems it does not work.
Here is the code
@model IEnumerable<
ActionViewModel
>
@(Html.Kendo().DropDownList()
.Name("actionDropDownList")
.DataTextField("Display")
.DataValueField("Id")
.BindTo(Model)
.OptionLabel(Localizer.GetString("Select an action..."))
.Deferred()
)
The generated script contains ""optionLabel":{"Name":"Select an action...","Value":"Select an action...","ResourceNotFound":true,"SearchedLocation":null}"
What do I have to give to the OptionalLabel so that it generates the optionalLabel with the properties of DataValueField and DataTextField?