Events

This section describes events fired by this widget.

See Also

contentReady

Raised when the widget's content is ready.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

The widget's instance.

element

jQuery

The widget's container.

model

Object

The model data. Available only when using Knockout.

Main article: onContentReady.

See Also

disposing

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

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
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

groupRendered

Fires after an item group element is rendered.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
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.

groupData

Object

The data that is bound to the group item.

groupElement

jQuery

An HTML element of the group.

groupIndex

Number

Specifies the index of the rendered group.

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

See Also

initialized

Raised only once, after the widget is initialized.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

The widget's instance.

element

jQuery

The widget's container.

Main article: onInitialized

See Also

itemClick

Fires when a list item is clicked.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
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.

itemData

Object

The data that is bound to the clicked item.

itemElement

jQuery

An HTML element of the item.

itemIndex

Number

|

Object

The index of the clicked item. In a grouped list, 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.

NOTE
This event fires only if the selectionMode option is set to 'none'.
See Also

itemContextMenu

Fires when the right mouse button is clicked when the pointer is over a widget item, or when the "sustained" (also known as a long press) touch action is performed.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
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.

itemData

Object

The data that is bound to the item.

itemElement

jQuery

An HTML element of the item.

itemIndex

Number

|

Object

Specifies an index of the item for which the context menu is displayed. In a grouped list, the index is specified as an object defining group and item indexes: { group: 0, item: 0 }.

jQueryEvent

jQuery.Event

Specifies the jQuery event that caused action execution.

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

See Also

itemDeleted

Fires when a widget item is deleted.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
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.

itemData

Object

The data that is bound to the removed item.

itemElement

jQuery

An HTML element of the item.

itemIndex

Number

|

Object

Specifies the index of the item being deleted. In a grouped list, the index represents an object defining group and item indexes: { group: 0, item: 0 }.

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

Note that the itemDeleted event is raised only if an item is deleted using the appropriate method of the widget or end-user interaction. If you delete an item from an observable array passed to the dataSource or items option, the widget entirely reloads the items array without raising the itemDeleted and itemDeleting events.

See Also

itemDeleting

Raised before an item is deleted from the data source.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

Provides access to the widget's instance.

element

jQuery

The widget's container.

model

Object

The model data. Available only if you use Knockout.

itemData

Object

The data of the to-be-deleted item.

itemElement

jQuery

The item's container.

itemIndex

Number

|

Object

The index of the to-be-deleted item.
In a grouped list, the index represents an object defining group and item indexes: { group: 0, item: 0 }.

cancel

Boolean

|

jQuery.Promise

Allows you to cancel the item deletion.

Main article: onItemDeleting

See Also

itemHold

Fires when the widget's collection item is being held for the time period specified by the itemHoldTimeout option.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
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.

itemData

Object

The data that is bound to the item being held.

itemElement

jQuery

An HTML element of the item.

itemIndex

Number

|

Object

The index of the item being held. In a grouped list, the index represents an object defining the group and item indexes: { group: 0, item: 0 }.

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

See Also

itemRendered

Fires after a collection item is rendered.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
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.

itemData

Object

The data that is bound to the item to be rendered.

itemElement

jQuery

An HTML element of the item.

itemIndex

Number

Specifies the index of the rendered item.

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

See Also

itemReordered

Fires when a list item is moved to another position.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
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.

itemData

Object

The data that is bound to the reordered item.

itemElement

jQuery

An HTML element of the item.

itemIndex

Number

|

Object

Specifies the current index of the item after reordering. In a grouped list, the index represents an object defining the group and item indexes: { group: 0, item: 0 }. This field holds the same value as toIndex.

fromIndex

Number

Specifies the previous index of the item. In a grouped list, the index represents an object defining the group and item indexes: { group: 0, item: 0 }.

toIndex

Number

Specifies the current index of the item. In a grouped list, the index represents an object defining the group and item indexes: { group: 0, item: 0 }.

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

To enable item reordering, set the allowItemReordering option to true.

NOTE
If a user drags an item and drops it at the same location, the event does not fire.
See Also

itemSwipe

Fires when an item is swiped.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
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

Returns an object representing the item.

itemData

Object

The data that is bound to the swiped item.

itemElement

jQuery

An HTML element of the item.

itemIndex

Number

|

Object

The index of the swiped items. In a grouped list, the index represents an object defining the group and item indexes: { group: 0, item: 0 }.

direction

String

Specifies whether the swipe operation is performed in the left or right direction.

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

See Also

optionChanged

Raised after an option of the widget is changed.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

The widget's instance.

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 when autopaging is enabled.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
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 list is refreshed as a result of the "pull down to refresh" gesture.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
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.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
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 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

selectAllValueChanged

Fires when the select all check box value changes.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
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

Boolean

Specifies the select all check box state.

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

NOTE
This event fires only if the selectionMode option is set to 'all'.
See Also

selectionChanged

Fires after a collection item is selected or unselected.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
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.

addedItems

Array

An array of items added to selection.

removedItems

Array

An array of items removed from selection.

Main article: onSelectionChanged

See Also