Returns a new IListDataSource that adds group information to the items of another IListDataSource.
var iListDataSource = WinJS.UI.computeDataSourceGroups(listDataSource, groupKey, groupData, options);
The data source for the individual items to group.
A callback function that accepts a single argument: an item in the IListDataSource. The function is called for each item in the list and must return the group key for that item as a string.
A callback function that accepts a single argument: an item in the IListDataSource. The function is called on one IListDataSource item for each group and must return an object that represents the header of that group.
An object that can contain properties that specify additional options:
A Number value that is the initial estimate for the initial number of groups. If -1 is specified, no result will be returned until the actual number of groups has been determined.
A Number greater than 0 that specifies the number of items to be fetched during each processing pass when searching for groups. In addition to the number specified, one item from the previous batch will always be included.
An IListDataSource that contains the items in the original data source and provides additional group information in the form of a "groups" property. The "groups" property returns another IListDataSource that enumerates the different groups in the list.
Minimum WinJS version