jQuery List 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

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

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

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

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

Object

The widget's instance.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

The model data. Available only if Knockout is used.

groupData

Object

The current group's data.

groupElement

HTMLElement | jQuery

The group's container. It is an HTML Element or a jQuery Element when you use jQuery.

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

Object

The widget's instance.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

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

Object

The widget's instance.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

The model data. Available only if Knockout is used.

itemData

Object

The data that is bound to the clicked item.

itemElement

HTMLElement | jQuery

The item's container. It is an HTML Element or a jQuery Element when you use jQuery.

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

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

model

Object

The model data. Available only if Knockout is used.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

component

Object

The widget's instance.

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

Object

The widget's instance.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

The model data. Available only if Knockout is used.

itemData

Object

The removed item's data.

itemElement

HTMLElement | jQuery

The item's container. It is an HTML Element or a jQuery Element when you use jQuery.

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

Boolean

|

Promise<void> (jQuery or native)

Allows you to cancel the item deletion.

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

itemElement

HTMLElement | jQuery

The item's container. It is an HTML Element or a jQuery Element when you use jQuery.

itemData

Object

The data of the item to be removed.

model

Object

The model data. Available only if you use Knockout.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

component

Object

The widget's instance.

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

model

Object

The model data. Available only if Knockout is used.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

component

Object

The widget's instance.

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

Object

The widget's instance.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

The model data. Available only if you use Knockout.

itemData

Object

The current item's data.

itemElement

HTMLElement | jQuery

The item's container. It is an HTML Element or a jQuery Element when you use jQuery.

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

Object

The widget's instance.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

The model data. Available only if Knockout is used.

itemData

Object

The reordered item's data.

itemElement

HTMLElement | jQuery

The item's container. It is an HTML Element or a jQuery Element when you use jQuery.

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

Object

The widget's instance.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

The model data. Available only if Knockout is used.

jQueryEvent

jQuery.Event

Use 'event' instead.

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

event

Event (jQuery or EventObject)

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

HTMLElement | jQuery

The item's container. It is an HTML Element or a jQuery Element when you use jQuery.

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

String

The option's short name.

model

Object

The model data. Available only if you use Knockout.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

component

Object

The widget's instance.

fullName

String

The option's full name.

value any

The option's new value.

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

Object

The widget's instance.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

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

Object

The widget's instance.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

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

Object

The widget's instance.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

The model data. Available only if Knockout is used.

jQueryEvent

jQuery.Event

Use 'event' instead.

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

event

Event (jQuery or EventObject)

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

selectAllValueChanged

Fires when the select all check box value changes.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

The widget's instance.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

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

selectionChanged

Fires after a collection item is selected or unselected.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

The widget's instance.

element

HTMLElement | jQuery

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

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