IListDataAdapter.insertBefore method
Inserts the specified data before the specified item.
Syntax
iListDataAdapter.insertBefore(key, data, nextKey, nextIndexHint).done( /* Your success and error handlers */ );
Parameters
key
Type: StringA key that can be used to retrieve the new data.
data
Type: ObjectThe new data to add to the IListDataAdapter object's data source.
nextKey
Type: StringThe key of an item in the IListDataAdapter object's data source. The new data will be inserted before this item.
nextIndexHint
Type: NumberThe index of the item to insert the new data before, 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 nextIndexHint has the same key as nextKey, in case the index of the item changed.
Requirements
Minimum WinJS version |
WinJS 3.0 |
Namespace |
WinJS.UI |