OData and CollectionView

The ICollectionView interface works great with OData sources, providing a standard way to specify filtering, sorting, and paging on the server or on the client.

This sample shows how you can populate a CollectionView object directly from OData sources and then use currency management to implement a simple master-detail view. Click a category in the first table, and the bottom table updates to show products from the selected category.

Categories

ID Name Description
{{item.CategoryID}} {{item.CategoryName}} {{item.Description}}


{{categories.currentItem?.CategoryName}} ({{products.items.length}} items)

ID Name Quantity Per Unit Unit Price Units In Stock Discontinued
{{item.ProductID}} {{item.ProductName}} {{item.QuantityPerUnit}} {{item.UnitPrice }} {{item.UnitsInStock }} {{item.Discontinued}}