ListView.onitemdragdrop event

Applies to Windows only

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

SynchronousNo
BubblesYes
CancelableYes

 

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:

PropertyMeaning
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 supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps only]

Minimum supported phone

None supported

Namespace

WinJS.UI

Library

Winjs.js

See also

ListView
detail

 

 

Show:
© 2015 Microsoft