Windows Dev Center

EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

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 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.Binding

Library

Winjs.js

See also

List

 

 

Anzeigen:
© 2015 Microsoft