Kendo.Mvc.UI.Fluent.SelectListItemBuilder

Defines the fluent interface for configuring child DropDownList items.

Methods

Text(System.String)

Sets the value for the item.

Parameters

value System.String

The value.

Example (ASPX)

<%= 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 (ASPX)

<%= 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 (ASPX)

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