ListView.onitemdragdrop event
Raised when an item is dropped onto the ListView as the result of a drag operation.
Syntax
<div
data-win-control="WinJS.UI.ListView"
data-win-options="{onitemdragdrop : handler}">
</div>
function handler(eventInfo) { /* Your code */ }
// addEventListener syntax
listView.addEventListener("itemdragdrop", handler);
listView.removeEventListener("itemdragdrop", handler);
Event information
Synchronous | No |
Bubbles | Yes |
Cancelable | Yes |
Event handler parameters
eventInfo
Type: CustomEvent**An object that contains info about the event. The detail property of this object contains the following sub-properties:
Property | Meaning |
---|---|
detail.dataTransfer | An anonymous JavaScript object with info about the data being moved. |
detail.index | The numerical index of the item after it is dropped into the ListView. |
detail.insertAfterIndex | The numerical index where the item is to be dropped after in the ListView. |
Requirements
Minimum WinJS version |
WinJS 3.0 |
Namespace |
WinJS.UI |