More Samples
Download Wijmo


The CollectionView class represents a view for grouping, sorting, filtering, and navigating data collections.

The object model used in the CollectionView class is similar to the one defined by .NET's ICollectionView and IPagedCollectionView interfaces.

To create data views, follow these steps:

  1. Create a new CollectionView.
  2. Set the sourceCollection to an array containing the raw data.
  3. Optionally add items to the sortDescriptions array to define how the data should be sorted.
  4. Optionally add items to the groupDescriptions array to define how the data should be grouped.
  5. Optionally set the filter property to a predicate function that selects the items that should be included in the view.
  6. Optionally set the pageSize property to define the number of items in the view, and use the moveToPage method to select the current page.
  7. Use the items array to get the output view.
  8. Use the currentItem property to get a reference to the item that is currently selected, and use the currentChanged event to detect selection changes.