Edit this page

Kendo.Mvc.UI.Fluent.ListBoxBuilder

Defines the fluent API for configuring the Kendo ListBox for ASP.NET MVC.

Methods

Selectable(Kendo.Mvc.UI.ListBoxSelectable)

Represents the selectable options.

Parameters

value Kendo.Mvc.UI.ListBoxSelectable

The value for Selectable

AutoBind(System.Boolean)

If set to false, the widget will not bind to the data source during initialization. In this case, the data binding will occur when the change event of the data source is fired. By default, the ListBox will bind to the data source that is specified in the configuration.

Parameters

value System.Boolean

The value that configures the autobind.

ConnectWith(System.String)

The id of the target ListBox to which items from the source ListBox will be transferred and vice versa. If you have to transfer items from the target ListBox over its toolbar, then you also need to set its connectWith option.

Parameters

value System.String

The value that configures the connectwith.

DataTextField(System.String)

The field of the data item that provides the text content of the list items. Based on this field, the widget filters the data source.

Parameters

value System.String

The value that configures the datatextfield.

DataValueField(System.String)

The field of the data item that provides the value of the widget.

Parameters

value System.String

The value that configures the datavaluefield.

Draggable

Indicates whether the ListBox items can be dragged and dropped.

Draggable(System.Boolean)

Indicates whether the ListBox items can be dragged and dropped.

Parameters

enabled System.Boolean

Enables or disables the draggable option.

Draggable(System.Action<Kendo.Mvc.UI.Fluent.ListBoxDraggableSettingsBuilder>)

Indicates whether the ListBox items can be dragged and dropped.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.ListBoxDraggableSettingsBuilder>

The action that configures the draggable.

DropSources(System.String[])

Array of id strings which determines the ListBoxes that can drag and drop their items to the current ListBox. The dropSources option describes a one way relationship. If you want a two-way connection, then set the dropSources option on both widgets.

Parameters

value System.String[]

The value that configures the dropsources.

Navigatable(System.Boolean)

Indicates whether the keyboard navigation is enabled or disabled.

Parameters

value System.Boolean

The value that configures the navigatable.

Messages(System.Action<Kendo.Mvc.UI.Fluent.ListBoxMessagesSettingsBuilder>)

Defines the localization texts for the ListBox. Used primarily for localization.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.ListBoxMessagesSettingsBuilder>

The action that configures the messages.

Template(System.String)

Specifies the item template of the ListBox.

Parameters

value System.String

The value that configures the template.

TemplateId(System.String)

Specifies the item template of the ListBox.

Parameters

value System.String

The value that configures the template.

Toolbar(System.Action<Kendo.Mvc.UI.Fluent.ListBoxToolbarSettingsBuilder>)

Defines the settings for displaying the toolbar of the ListBox. The toolbar allows you to execute a set of predefined actions.By default, the toolbar is not displayed. If the tools array is populated, then the toolbar and the corresponding tools are displayed.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.ListBoxToolbarSettingsBuilder>

The action that configures the toolbar.

BindTo(System.Collections.IEnumerable)

Binds the ListBox to an IEnumerable list.

Parameters

dataSource System.Collections.IEnumerable

The data source.

BindTo(System.Collections.Generic.IEnumerable<System.Web.Mvc.SelectListItem>)

Binds the ListBox to a list of SelectListItem.

Parameters

dataSource System.Collections.Generic.IEnumerable<System.Web.Mvc.SelectListItem>

The data source.

DataSource(System.Action<Kendo.Mvc.UI.Fluent.ReadOnlyDataSourceBuilder>)

Sets the data source configuration of the ListBox.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.ReadOnlyDataSourceBuilder>

The lambda which configures the data source

Events(System.Action<Kendo.Mvc.UI.Fluent.ListBoxEventBuilder>)

Configures the client-side events.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.ListBoxEventBuilder>

The client events action.

Example (ASPX)

<%= Html.Kendo().ListBox()
.Name("ListBox")
.Events(events => events
    .Change("onChange")
)
%>