Events

This section describes events exposed by this widget.

contentReady

Fires when widget content is ready.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget 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 and AngularJS approaches.

disposing

Fires when the widget is being removed.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget 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 and AngularJS approaches.

See Also
NOTE
This event fires only if the widget is removed using the remove(), empty(), or html() jQuery methods.

groupRendered

Fires after an item group element is rendered.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget 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 and AngularJS approaches.

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.

initialized

Fires when the widget is initialized.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget instance.

element: jQuery

An HTML element of the widget.

itemClick

Fires when a list item is clicked.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget 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 and AngularJS approaches.

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 }.

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

itemContextMenu

Fires when the 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.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget 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 and AngularJS approaches.

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.

itemDeleted

Fires when a widget item is deleted.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget 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 and AngularJS approaches.

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 }.

See Also

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.

itemDeleting

Fires before a collection item is deleted.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget 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 and AngularJS approaches.

itemData: Object

The data that is bound to the clicked item.

itemElement: jQuery

An HTML element of the item.

itemIndex: Number|Object

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

Return Value: jQuery.Promise

A Promise of the jQuery Deferred object resolved if the item deletion is confirmed and rejected if deletion is canceled.

You can use this event to add a confirmation dialog displayed when a widget item is deleted.

JavaScript
myWidget.on('itemDeleting', function(e) {
    return DevExpress.ui.dialog.confirm("Do you really want to delete the item?");
})

Note that the itemDeleting event is raised only if an item is being 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

itemHold

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

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget 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 and AngularJS approaches.

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 }.

itemRendered

Fires after a collection item is rendered.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget 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 and AngularJS approaches.

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.

itemReordered

Fires when a list item is moved to another position.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget 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 and AngularJS approaches.

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 }.

itemSwipe

Fires when an item is swiped.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget 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 and AngularJS approaches.

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.

optionChanged

Fires after an option of the component is changed.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget instance.

name: String

Specifies the name of the option whose value is changed.

fullName: String

Specifies a full name of the option whose value is changed. The full name is formed by concatenating the names of the options that are presented in the hierarchy of the given option. The names are delimited by commas.

value: any

Specifies a new value for the option.

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 and AngularJS approaches.

pageLoading

Fires before loading the next page when autopaging is enabled.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget 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 and AngularJS approaches.

pullRefresh

Fires before the 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 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 and AngularJS approaches.

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 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 and AngularJS approaches.

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.

selectionChanged

Fires after a collection item is selected or unselected.

Event Handler Argument:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget 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 and AngularJS approaches.

addedItems: Array

An array of items added to selection.

removedItems: Array

An array of items removed from selection.