The examples are nice, but not very "real world", e.g. data is just made from arrays with fruit names.
Not in my .js I have this(only the main pieces of course):
// Here are two lists...
var categoryTiles = new WinJS.Binding.List([]);
var categoryGroupedList = new WinJS.Binding.List([]);
// In the binding code we have this....bind the ListView, and set the group list:
theListView.itemDataSource = categoryTiles.dataSource;
categoryGroupedList = categoryTiles.createGrouped(getGroupKey, getGroupData, compareGroups).groups;
And here is the ListView:
<div id="Category_All_Products_Items" class="category-all-contents" data-win-control="WinJS.UI.ListView" data-win-options="{
itemDataSource: categoryTiles.dataSource,
itemTemplate: ItemBoxTemplate,
selectionMode: 'none',
groupDataSource: categoryGroupedList.dataSource,
groupHeaderTemplate: headerTemplate,
layout: {type: WinJS.UI.GridLayout}
}">
It seems to die in the groupDataSource's datasource peoperty....seems to be undefined.
Any tips?