Repeater.onitemmoving event

Raised after an item has been moved from one index to another in the Repeater control's data source but before the corresponding Document Object Model (DOM) element has been moved.
Syntax
<div data-win-control="WinJS.UI.Repeater" data-win-options="{onitemmoving : handler}" />
function handler(eventInfo) { /* Your code */ } // addEventListener syntax repeater.addEventListener("itemmoving", handler); repeater.removeEventListener("itemmoving", handler);
Event information
| Synchronous | No |
|---|---|
| Bubbles | Yes |
| Cancelable | Yes |
Event handler parameters
- eventInfo
-
Type: CustomEvent
An object that contains information about the event. The detail property of this object contains the following sub-properties:
-
The DOM element that corresponds to the item that moved.
-
The index of the item.
-
The value used as the key in the getItemFromKey and indexOfKey methods.
-
The old index of the item that moved.
-
The new index of the item that moved.
Requirements
|
Minimum WinJS version |
WinJS 2.0 |
|---|---|
|
Namespace |
WinJS.UI |
See also