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:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

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:
component:

Object

The widget instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

See Also

groupRendered

Fires after an item group element is rendered.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if Knockout is used.

groupData:

Object

The current group's data.

groupElement:

Element (jQuery or HTML)

The group's container.

groupIndex:

Number

The group's index.

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:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

Main article: onInitialized

See Also

itemClick

Fires when a list item is clicked.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if Knockout is used.

itemData:

Object

The data that is bound to the clicked item.

itemElement:

Element (jQuery or HTML)

The item's container.

itemIndex:

Number

|

Object

The clicked item's index. In a grouped list, the index represents an object defining 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
Show Example:
AngularJS
Knockout
jQuery

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

Information about the event.

Object structure:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if Knockout is used.

itemData:

Object

The item's data.

itemElement:

Element (jQuery or HTML)

The item's container.

itemIndex:

Number

|

Object

The 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

The jQuery event that caused the handler execution. Deprecated in favor of the event field.

event:

Event (jQuery or dxEvent)

The event that caused the handler execution. It is a dxEvent or a jQuery.Event when you use jQuery.

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

Information about the event.

Object structure:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if Knockout is used.

itemData:

Object

The removed item's data.

itemElement:

Element (jQuery or HTML)

The item's container.

itemIndex:

Number

|

Object

The removed item's index. In a grouped list, the index represents an object defining the 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:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

itemData:

Object

The data of the item to be removed.

itemElement:

Element (jQuery or HTML)

The item's container.

itemIndex:

Number

|

Object

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

cancel:

Boolean

|

Promise<void> (jQuery or native)

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

Information about the event.

Object structure:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if Knockout is used.

itemData:

Object

The data of the item being held.

itemElement:

Element (jQuery or HTML)

The item's container.

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

Information about the event.

Object structure:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

itemData:

Object

The current item's data.

itemElement:

Element (jQuery or HTML)

The item's container.

itemIndex:

Number

The current item's index.

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

Information about the event.

Object structure:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if Knockout is used.

itemData:

Object

The reordered item's data.

itemElement:

Element (jQuery or HTML)

The item's container.

itemIndex:

Number

|

Object

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

fromIndex:

Number

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

toIndex:

Number

The item's current index. 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

Information about the event.

Object structure:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if Knockout is used.

jQueryEvent:

jQuery.Event

The jQuery event that caused the handler execution. Deprecated in favor of the event field.

event:

Event (jQuery or dxEvent)

The event that caused the handler execution. It is a dxEvent or a jQuery.Event when you use jQuery.

itemData:

Object

The swiped item's data.

itemElement:

Element (jQuery or HTML)

The item's container.

itemIndex:

Number

|

Object

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

direction:

String

The direction in which the item is swiped.

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

See Also

optionChanged

Raised after a widget option is changed.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget's instance.

name:

String

The option's short name.

fullName:

String

The option's full name.

value: any

The option's new value.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

See Also

pageLoading

Fires before loading the next page when autopaging is enabled.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if Knockout is used.

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

Information about the event.

Object structure:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if Knockout is used.

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

Information about the event.

Object structure:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if Knockout is used.

jQueryEvent:

jQuery.Event

The jQuery event that caused the handler execution. Deprecated in favor of the event field.

event:

Event (jQuery or dxEvent)

The event that caused the handler execution. It is a dxEvent or a jQuery.Event when you use jQuery.

scrollOffset:

Object

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
Show Example:
AngularJS
Knockout
jQuery

selectAllValueChanged

Fires when the select all check box value changes.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if Knockout is used.

value:

Boolean

The "Select All" check box's 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
Show Example:
AngularJS
Knockout
jQuery

selectionChanged

Fires after a collection item is selected or unselected.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
component:

Object

The widget's instance.

element:

Element (jQuery or HTML)

The widget's container.

model:

Object

The model data. Available only if you use Knockout.

addedItems:

Array<any>

The data of the items that have been selected.

removedItems:

Array<any>

The data of the items whose selection has been canceled.

Main article: onSelectionChanged

See Also
Show Example:
AngularJS
Knockout
jQuery