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.
ID | Name | Description |
---|---|---|
{{item.CategoryID}} | {{item.CategoryName}} | {{item.Description}} |
ID | Name | Quantity Per Unit | Unit Price | Units In Stock | Discontinued |
---|---|---|---|---|---|
{{item.ProductID}} | {{item.ProductName}} | {{item.QuantityPerUnit}} | {{item.UnitPrice }} | {{item.UnitsInStock }} | {{item.Discontinued}} |