New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

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

Definition

Constructors

C#
public ListBoxEventBuilder(IDictionary<string, object> events)
Parameters:eventsIDictionary<string, object>

Methods

Defines the handler of the Add client-side event. Fires before an item is added to the ListBox.The function context of the event handler (available through the this keyword) that will be set to the widget instance.

C#
public ListBoxEventBuilder Add(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Add event.

Returns:

ListBoxEventBuilder

Example:
C#
@( Html.Kendo().ListBox()
.Name("listBox")
.Events(events =&gt; events
.Add("handler")
)
)

Defines the handler of the Change client-side event. Fires when the ListBox selection has changed.The function context of the event handler (available through the this keyword) that will be set to the widget instance.

C#
public ListBoxEventBuilder Change(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Change event.

Returns:

ListBoxEventBuilder

Example:
C#
@( Html.Kendo().ListBox()
.Name("listBox")
.Events(events =&gt; events
.Change("handler")
)
)

Defines the handler of the DataBound client-side event. Fires when the ListBox has received data from the data source and is already rendered.The function context of the event handler (available through the this keyword) that will be set to the widget instance.

C#
public ListBoxEventBuilder DataBound(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the DataBound event.

Returns:

ListBoxEventBuilder

Example:
C#
@( Html.Kendo().ListBox()
.Name("listBox")
.Events(events =&gt; events
.DataBound("handler")
)
)

Defines the handler of the Drag client-side event. Fires when the placeholder of the ListBox changes its position.

C#
public ListBoxEventBuilder Drag(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Drag event.

Returns:

ListBoxEventBuilder

Example:
C#
@( Html.Kendo().ListBox()
.Name("listBox")
.Events(events =&gt; events
.Drag("handler")
)
)

Defines the handler of the DragEnd client-side event. Fires when the dragging of the item ends but before its position is changed in the DOM.

C#
public ListBoxEventBuilder DragEnd(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the DragEnd event.

Returns:

ListBoxEventBuilder

Example:
C#
@( Html.Kendo().ListBox()
.Name("listBox")
.Events(events =&gt; events
.DragEnd("handler")
)
)

Defines the handler of the DragStart client-side event. Fires when the dragging of the ListBox items starts.

C#
public ListBoxEventBuilder DragStart(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the DragStart event.

Returns:

ListBoxEventBuilder

Example:
C#
@( Html.Kendo().ListBox()
.Name("listBox")
.Events(events =&gt; events
.DragStart("handler")
)
)

Defines the handler of the Drop client-side event. Fires when a ListBox item is dropped over one of the drop targets.

C#
public ListBoxEventBuilder Drop(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Drop event.

Returns:

ListBoxEventBuilder

Example:
C#
@( Html.Kendo().ListBox()
.Name("listBox")
.Events(events =&gt; events
.Drop("handler")
)
)

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the ListBox is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public ListBoxEventBuilder KendoKeydown(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the KendoKeydown event.

Returns:

ListBoxEventBuilder

Defines the handler of the Remove client-side event. Fires before an item is removed from the ListBox.The function context of the event handler (available through the this keyword) that will be set to the widget instance.

C#
public ListBoxEventBuilder Remove(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Remove event.

Returns:

ListBoxEventBuilder

Example:
C#
@( Html.Kendo().ListBox()
.Name("listBox")
.Events(events =&gt; events
.Remove("handler")
)
)

Defines the handler of the Reorder client-side event. Fires when ListBox items are reordered.

C#
public ListBoxEventBuilder Reorder(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Reorder event.

Returns:

ListBoxEventBuilder

Example:
C#
@( Html.Kendo().ListBox()
.Name("listBox")
.Events(events =&gt; events
.Reorder("handler")
)
)