0

I understand providing the data template to the ItemTemplate selector, but the items that I want to be displayed are not part of the data. For instance let's say you have the following list of children in the classroom:

  1. Mark Anderson
  2. Sara Buckingham
  3. Dave Christy
  4. Jeni Thompson.

and are using the first letter in the last name to organize the data. If I pass dataItems that represent the students (FirstName, LastName) to the groupedItemList

'groupedItemList = itemList.createGrouped(
                function getGroupKey(dataItem) {
                    return dataItem.LastName.toUpperCase().charAt(0);

                },
                function getGroupData(dataItem) {
                    return {
                        Name: dataItem.LastName.toUpperCase().charAt(0)
                    };
                },
                function compareGroups(left, right) {
                    return left.toUpperCase().charCodeAt(0) - right.toUpperCase().charCodeAt(0);
                }
            ),`

The semantic zoom out contains only the following letters

A, B, C, T. 

I would like a list of all the letters in the alphabet and then style them so that those letters that have no items get another visual treatment.

CloudyMarble
  • 36,908
  • 70
  • 97
  • 130
  • What are you using to make the semantic zoom view? If you are using a GridView you can use ItemTemplateSelector to check that out – DVD Jan 12 '13 at 17:10
  • I am using WinJS.UI.ListView which i believe supports the ItemTemplateSelector. Can you elaborate on your response. – user1956461 Jan 14 '13 at 15:37
  • ItemTemplateSelector lets you choose witch datatemplate will your item have (don't really know how this works in winjs, but you can check the documentation), to do this every time the listview needs to draw an element it asks your itemTemplateSelector witch datatemplate do you want to give, with this behavior you can check if your item should be for example Clickable or not ;) – DVD Jan 14 '13 at 22:08

1 Answers1

0

After spent some time trying to find the solution to the same problem, I have have found a solution and posted it on gist.

https://gist.github.com/pimpreneil/4714483

Hope it is clear enough.

Pimpreneil
  • 61
  • 2