New to Telerik UI for ASP.NET Core? Download free 30-day trial

SelectListItemBuilder

Methods

Text(System.String)

Sets the value for the item.

Parameters

value - System.String

The value.

Example


             @( Html.Kendo().DropDownList()
                        .Name("DropDownList")
                        .Items(items => items.Add().Text("First item."))
            )

Value(System.String)

Sets the value for the item.

Parameters

value - System.String

The value.

Example


             @( Html.Kendo().DropDownList()
                        .Name("DropDownList")
                        .Items(items => items.Add().Value("1"))
            )

Selected(System.Boolean)

Define when the item will be selected on intial render.

Parameters

value - System.Boolean

If true the item will be selected.

Example


             @( Html.Kendo().DropDownList()
                        .Name("DropDownList")
                        .Items(items => items.Add().Text("First Item").Selected(true))
            )

In this article
Not finding the help you need?