Windows desktop applications
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

List.dataSource property

Applies to Windows and Windows Phone

Gets the IListDataSource for the list. The only purpose of this property is to adapt a List to the data model that is used by ListView and FlipView.

Syntax


var source = list.dataSource;

Property value

Type: IListDataSource

The data source for the list.

Examples

The following code shows how to assign the data source of a list to a ListView control.


var list = new WinJS.Binding.List();
var listView = document.querySelector(".win-listview");
listView.winControl.itemDataSource = list.dataSource;


Requirements

Minimum WinJS version

WinJS 1.0

Namespace

WinJS.Binding

See also

List

 

 

Show:
© 2016 Microsoft