Repeater.onitemchanging event

Applies to Windows and Windows Phone

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

Syntax


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


function handler(eventInfo) { /* Your code */ }
 
// addEventListener syntax
repeater.addEventListener("itemchanging", handler);
repeater.removeEventListener("itemchanging", 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.index

The index of the changed item.

detail.key

The value used as the key in the getItemFromKey and indexOfKey methods.

detail.newElement

The new DOM element that will replace the old element.

detail.newItem

The key for the new item. The newItem.data field contains the new item.

detail.newValue

The new data item.

detail.oldElement

The DOM element that will replace the old element.

detail.oldItem

The old key. The oldItem.data field contains the old item.

detail.oldValue

The old data item.

detail.setPromise

A Promise that completes after the change animations have finished.

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

Windows Phone 8.1

Namespace

WinJS.UI

Library

Ui.js

See also

Repeater

 

 

Show:
© 2014 Microsoft