IListDataAdapter.insertAfter method

Applies to Windows and Windows Phone

Inserts the specified data after the specified item.

Syntax


iListDataAdapter.insertAfter(key, data, previousKey, previousIndexHint).done( /* Your success and error handlers */ );

Parameters

key

Type: String

A key that can be used to retrieve the new data.

data

Type: Object

The new data to add to the IListDataAdapter object's data source.

previousKey

Type: String

The key of an item in the IListDataAdapter object's data source. The new data will be inserted after this item.

previousIndexHint

Type: Number

The index of the item to insert the new data after, if known.

Return value

Type: Promise

A Promise that contains the IItem that was added or an EditError if an error was encountered.

Remarks

Implementing this method

When implementing this method, you should verify that the item at previousIndexHint has the same key as previousKey, in case the index of the item changed.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.UI

See also

IListDataAdapter

 

 

Show:
© 2014 Microsoft