DataGridCollectionView Class
See Also  Members  
Xceed.Wpf.DataGrid Assembly > Xceed.Wpf.DataGrid Namespace : DataGridCollectionView Class

The DataGridCollectionView class allows any collection that implements the IEnumerable interface to be grouped, sorted, and filtered.

Object Model





Syntax

Remarks

Contrary to the BindingListCollectionView class, the DataGridCollectionView class will never touch the underlying data source, meaning that the original sorting and filtering present in the data source will not be modified. When sorting, the DataGridCollectionView class also provides an estimated 20% increase in performance. In addition to the sorting speed, a limited number of "resets" make the DataGridCollectionView class a better choice when performance is of the utmost importance.

A DataGridItemProperty will be created for each property in the underlying data source and can be retrieved through the ItemProperties property of the DataGridCollectionView.

In addition to the native CollectionView filtering, the DataGridCollectionView and DataGridCollectionViewSource classes also support automatic filtering, which provides Excel-like end-user filtering according to the distinct values of each column. Automatic filtering can be enabled by setting the AutoFilterMode property to And or Or (by default, None), indicating whether data items will be filtered according to all or at least one of the filtering criteria defined by each column respectively.

Notes

Programmatically, the ItemProperties.Clear method must be called prior to adding DataGridItemProperty objects to the ItemProperties collection to remove items that were automatically added when the DataGridCollectionView was instantiated.

Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.Data.CollectionView
         Xceed.Wpf.DataGrid.DataGridCollectionView

Requirements

Supported Operating Systems: Windows Server 2003 Service Pack 1; Windows Vista; Windows XP Service Pack 2

See Also