Events

This section describes events exposed by this widget.

contentReady

Fires when widget content is ready.

Event Handler Argument:
e: Object
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.

disposing

Fires when you dispose of this component.

Event Handler Argument:
e: Object
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.

itemClick

Fires when a list item is clicked.

Event Handler Argument:
e: Object
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.
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 }.

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:
e: Object
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.
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 }.

itemDeleted

Fires when a widget item is deleted.

Event Handler Argument:
e: Object
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.
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:
e: Object
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.
itemData: Object
The data that is bound to the item to be deleted.
itemElement: jQuery
An HTML element of the item.
itemIndex: Number|Object
Specifies the index of the item being deleted.
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:
e: Object
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.
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:
e: Object
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.
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:
e: Object
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.
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. In a grouped list, the index represents an object defining the group and item indexes: { group: 0, item: 0 }.
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:
e: Object
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.
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:
e: Object
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.
value: any
Specifies a new value for the option.

pageLoading

Fires before loading the next page when autopaging is enabled.

Event Handler Argument:
e: Object
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.

pullRefresh

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

Event Handler Argument:
e: Object
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.
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:
e: Object
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.
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:
e: Object
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.