Kendo.Mvc.UI.Fluent.DropDownListBuilder
Edit this docDefines the fluent interface for configuring the DropDownList component.
No results. Try clearing the filter.
Sets the field of the data item that provides the value content of the list items.
Example (ASPX)
<%= Html.Kendo().DropDownList()
.Name("DropDownList")
.DataTextField("Text")
.DataValueField("Value")
%>
Configures the client-side events.
Example (ASPX)
<%= Html.Kendo().DropDownList()
.Name("DropDownList")
.Events(events =>
events.Change("change")
)
%>
Defines the items in the DropDownList
Example (ASPX)
<%= Html.Telerik().DropDownList()
.Name("DropDownList")
.Items(items =>
{
items.Add().Text("First Item");
items.Add().Text("Second Item");
})
%>
Define the text of the default empty item. If the value is an object, then the widget will use it directly.
Example (ASPX)
<%= Html.Kendo().DropDownList()
.Name("DropDownList")
.OptionLabel("Select country...")
%>
Use it to set selected item index
Parameters
- index
System.Int32 Item index.
Example (ASPX)
<%= Html.Kendo().DropDownList()
.Name("DropDownList")
.SelectedIndex(0);
%>
Use it to set the Id of the parent DropDownList.
Example (ASPX)
<%= Html.Telerik().DropDownList()
.Name("DropDownList2")
.CascadeFrom("DropDownList1")
%>
Define the text of the widget, when the autoBind is set to false.
Example (ASPX)
<%= Html.Telerik().DropDownList()
.Name("DropDownList")
.Text("Chai")
.AutoBind(false)
%>