Provides access to a data source and enables you to bind, change, add, remove, and move items in that data source.
Members
The IListDataSource interface has these types of members:
Events
The IListDataSource interface has these events.
| Event | Description |
|---|---|
| statuschanged |
Occurs when the status of the IListDataSource changes. |
Methods
The IListDataSource interface has these methods.
| Method | Description |
|---|---|
| beginEdits |
Notifies the IListDataSource that a sequence of edits is about to begin. The IListDataSource will defer notifications until endEdits is called. |
| change |
Overwrites the data of the specified item. |
| createListBinding |
Creates an IListBinding that can retrieve items from the IListDataSource, enumerate the contents of the IListDataSource object's data, and optionally register for change notifications. |
| endEdits |
Notifies the IListDataSource that the batch of edits that began with the last beginEdits call has completed. The IListDataSource will submit notifications for any changes that occurred between the beginEdits and endEdits calls as a batch and resume normal change notifications. |
| getCount |
Retrieves the number of items in the data source. |
| insertAfter |
Inserts a new item after another item. |
| insertAtEnd |
Adds an item to the end of the data source. |
| insertAtStart |
Adds an item to the beginning of the data source. |
| insertBefore |
Inserts an item before another item. |
| invalidateAll |
Indicates that all previous data obtained from the IListDataAdapter is invalid and should be refreshed. |
| itemFromDescription |
Retrieves the item that has the specified description. |
| itemFromIndex |
Retrieves the item at the specified index. |
| itemFromKey |
Retrieves the item with the specified key. |
| moveAfter |
Moves an item to just after another item. |
| moveBefore |
Moves an item before another item. |
| moveToEnd |
Moves an item to the end of the data source. |
| moveToStart |
Moves the specified item to the beginning of the data source. |
| remove |
Removes the specified item from the data source. |
Remarks
A IListDataSource connects a control (such as a ListView) to an IListDataAdapter. The IListDataSource manipulates the IListDataAdapter, which does the work of actually manipulating and retrieving data.
The Windows Library for JavaScript provides several types of IListDataSource objects:
- You can use a List to create an IListDataSource from an array of data.
- You can use a StorageDataSource to access information about files and directories.
You can also create your own custom data source that connects to some other type of data provider, such as a web service or database. For instructions, see How to create a custom data source.
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Namespace |
WinJS.UI |
See also
Build date: 12/5/2012