itemFromKey method

IListDataSource.itemFromKey method

Applies to Windows and Windows Phone

Retrieves the item with the specified key.

Syntax


iListDataSource.itemFromKey(key, description).done( /* Your success and error handlers */ );

Parameters

key

Type: String

The key of the item to retrieve. It must be a non-empty string.

description [optional]

Type: Object

Domain-specific information that IListDataAdapter can use to improve the retrieval time.

Return value

Type: Promise

A Promise that provides an IItem that contains the requested item or a FetchError if an error was encountered. If the item was not found, the promise completes with a null value.

Requirements

Minimum WinJS version

WinJS 3.0

Namespace

WinJS.UI

See also

IListDataSource

 

 

Show:
© 2016 Microsoft