Events

This section describes events fired by this widget.

See Also

closed

Fires after a drop-down list has been hidden.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object
element: jQuery

An HTML element of the widget.

model: Object

Provides access to the data that is available for binding against the element. Available only in the Knockout approach.

Instead, you can use the onClosed option to handle the event.

See Also
Show Example:
AngularJS
Knockout
jQuery

contentReady

Raised when the widget's content is ready.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object
element: jQuery

An HTML element of the widget.

model: Object

Provides access to the data that is available for binding against the element. Available only in the Knockout approach.

If data displayed by the widget is specified using a DataSource instance, the contentReady event fires each time the load() method of the DataSource instance is called as well as when the widget content is ready. In this case, when you create the widget, the contentReady event is raised twice: when the widget's content is ready (at this moment, the widget does not display items) and when the DataSource is loaded (the widget displays the loaded items).

disposing

Raised when the widget is removed from the DOM using the remove(), empty(), or html() jQuery methods only.

Event Handler Argument:

Information about the event.

Object structure:
component: Object

The widget instance.

element: jQuery

The widget's container.

model: Object

The model data. Available only if you use Knockout.

Main article: onDisposing

See Also

initialized

Raised only once, after the widget is initialized.

Event Handler Argument:

Information about the event.

Object structure:
component: Object

The widget's instance.

element: jQuery

The widget's container.

Main article: onInitialized

See Also

itemClick

Fires when a widget item is clicked.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object
element: jQuery

An HTML element of the widget.

model: Object

Provides access to the data that is available for binding against the element. Available only in the Knockout approach.

itemData: Object

The data that is bound to the clicked item.

itemElement: Object

An HTML element of the item.

itemIndex: Number|Object

The index of the clicked item. If the widget items are grouped, the index represents an object defining the group and item indexes: { group: 0, item: 0 }.

Instead, you can use the onItemClick option to handle the event.

See Also
Show Example:
AngularJS
Knockout
jQuery

opened

Fires when the drop-down editor is shown.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object
element: jQuery

An HTML element of the widget.

model: Object

Provides access to the data that is available for binding against the element. Available only in the Knockout approach.

Instead, you can use the onOpened option to handle the event.

See Also
Show Example:
AngularJS
Knockout
jQuery

optionChanged

Raised after an option of the widget is changed.

Event Handler Argument:

Information about the event.

Object structure:
component: Object
name: String

A short name of the option whose value has been changed.

fullName: String

A full name of the option whose value has been changed; contains a full hierarchy of the option.

value: any

A new value for the option.

element: jQuery

The widget's container.

model: Object

The model data. Available only if you use Knockout.

Main article: onOptionChanged

See Also

pageLoading

Fires before loading the next page in the lookup list if autopaging is enabled.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget's instance.

element: jQuery

An HTML element of the widget.

model: Object

Provides access to the data that is available for binding against the element. Available only in the Knockout approach.

Instead, you can use the onPageLoading option to handle the event.

See Also

pullRefresh

Fires before the lookup list is refreshed as a result of the "pull down to refresh" gesture.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget's instance.

element: jQuery

An HTML element of the widget.

model: Object

Provides access to the data that is available for binding against the element. Available only in the Knockout approach.

Instead, you can use the onPullRefresh option to handle the event.

NOTE
The "pull down to refresh" gesture is not supported by desktop browsers and Windows Phone devices. You can use it only in mobile themes except the Windows Phone theme.
See Also

scroll

Fires on each scroll gesture.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget's instance.

element: jQuery

An HTML element of the widget.

model: Object

Provides access to the data that is available for binding against the element. Available only in the Knockout approach.

jQueryEvent: jQuery.Event

Specifies the jQuery event that caused the action execution.

scrollOffset: Object

Returns the current scroll offset in the following format { top: topOffset, left: leftOffset }.

reachedLeft: Boolean

Indicates whether the container's left boundary is reached.

reachedRight: Boolean

Indicates whether the container's right boundary is reached

reachedTop: Boolean

Indicates whether the container's top boundary is reached.

reachedBottom: Boolean

Indicates whether the container's bottom boundary is reached.

Instead, you can use the onScroll option to handle the event.

See Also

selectionChanged

Fires when the selection changes.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object
element: jQuery

An HTML element of the widget.

model: Object

Provides access to the data that is available for binding against the element. Available only in the Knockout approach.

selectedItem: Object

Provides access to the currently selected item.

Instead, you can use the onSelectionChanged option to handle the event.

See Also
Show Example:
AngularJS
Knockout
jQuery

titleRendered

Fires after the widget title is rendered.

Event Handler Argument:

Provides function parameters.

Object structure:
titleElement: jQuery

The HTML element of the item title.

element: jQuery

An HTML element of the widget.

model: Object

Provides access to the data that is available for binding against the element. Available only in the Knockout approach.

Instead, you can use the onTitleRendered option to handle the event.

See Also

valueChanged

Fires when the editor value changes.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget's instance.

element: jQuery

An HTML element of the widget.

model: Object

Provides access to the data that is available for binding against the element. Available only in the Knockout approach.

value: Object

Specifies the widget's new value.

previousValue: Object

Specifies the widget's previous value.

jQueryEvent: jQuery.Event

A deprecated field. Use the itemData field instead.

Instead, you can use the onValueChanged option to handle the event.

Use the selectedItem field of the argument object passed to the selectionChanged event handler to access the selected item.

See Also
Show Example:
AngularJS
Knockout
jQuery