onitemremoving event

Repeater.onitemremoving event

Applies to Windows and Windows Phone

Raised after an item has been removed from the Repeater control's data source but before the corresponding Document Object Model (DOM) element has been removed.

Syntax


<div 
    data-win-control="WinJS.UI.Repeater" 
    data-win-options="{onitemremoving : handler}">
</div>


function handler(eventInfo) { /* Your code */ }
 
// addEventListener syntax
repeater.addEventListener("itemremoving", handler);
repeater.removeEventListener("itemremoving", handler);


Event information

SynchronousNo
BubblesYes
CancelableYes

 

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:

detail.affectedElement

The DOM element that will be removed.

detail.index

The index of the item being removed.

detail.item

The corresponding data item that was removed.

detail.setPromise

A Promise that completes after the removal animations complete.

Requirements

Minimum WinJS version

WinJS 2.0

Namespace

WinJS.UI

See also

Repeater

 

 

Show:
© 2016 Microsoft