Xceed Toolkit Plus for WPF v5.1 Documentation
Xceed.Wpf.DataGrid.Toolkit Assembly / Xceed.Wpf.DataGrid Namespace / DataGridCollectionView Class
Members


In This Topic
    DataGridCollectionView Class
    In This Topic
    The DataGridCollectionView class allows any collection that implements the IEnumerable interface to be grouped, sorted, and filtered.
    Syntax
    'Declaration
     
    Public NotInheritable Class DataGridCollectionView 
       Inherits DataGridCollectionViewBase
    'Usage
     
    Dim instance As DataGridCollectionView
    public sealed class DataGridCollectionView : DataGridCollectionViewBase 
    Remarks

    Unlike 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.

    Inheritance Hierarchy

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

    Public Constructors
     NameDescription
    Public ConstructorOverloaded. Initializes a new instance of the DataGridCollectionView class.  
    Top
    Public Properties
     NameDescription
    Public PropertyGets a value indicating whether new items can be added to the collection through the AddNew method.  
    Public PropertyGets a value indicating whether the foreign key descriptions are automatically created. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets a value indicating whether the item properties are automatically created. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets a value indicating whether a new item can be added to the collection. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets a value indicating whether the collection can discard pending changes and restore the original values of an edited object. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets a value indicating whether the view supports filtering. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets a value indicating whether the view supports grouping. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets a value indicating whether an item can be removed from the collection. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets a value indicating whether the view can be sorted. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public Property (Inherited from System.Windows.Data.CollectionView)
    Public PropertyOverridden. Gets the number of items in the view.  
    Public PropertyGets or sets the culture to use during sorting. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets the item that is currently being added to the underlying data source. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets the item in the underlying data source that is currently being edited. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets the view's current item. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets the ordinal position of the CurrentItem within the—optionally sorted and filtered—view. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public Property (Inherited from System.Windows.Threading.DispatcherObject)
    Public PropertyGets or sets a callback used to determine if an item is suitable for inclusion in the view (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets a collection of GroupDescription objects that describe how the items in the collection are grouped in the view. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets the runtime groups that are created based on the GroupDescriptions. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets a value indicating whether an add transaction is in progress. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets a value indicating whether the view's CurrentItem is beyond the end of the collection. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets a value indicating whether the view's CurrentItem is beyond the beginning of the collection. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets a value indicating whether an item in the underlying data source is being edited. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyOverridden. Gets a value indicating whether the filtered view is empty.  
    Public Property (Inherited from System.Windows.Data.CollectionView)
    Public PropertyGets the DataGridItemProperty objects that determine the characteristics of the items contained in the view. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets the type of the items contained in the collection view or added through the SourceItems property. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets a value that indicates whether this view needs to be refreshed. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyGets a collection of SortDescription objects that describe how the items in the collection are sorted in the view. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public PropertyOverridden. Gets the underlying un-filtered collection.  
    Public PropertyGets the items that are contained in the SourceCollection.  
    Top
    Public Methods
     NameDescription
    Public MethodAdds a new item to the underlying data source. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public MethodCancels the edit process. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public MethodDiscards the new item added through a call to the AddNew method before it is committed. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public MethodCommits the modifications made to the item in the underlying data source that is being edited. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public MethodCommits the new item to the underlying data source. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public MethodOverridden. Returns a value indicating whether the specified item exists in the collection.  
    Public MethodEnters a defer cycle that you can use to merge changes to the view and delay automatic refresh. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public Method (Inherited from System.Windows.Data.CollectionView)
    Public MethodEdits the specified item in the underlying data source. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public MethodOverridden. Retrieves the item at the specified index in the view.  
    Public MethodOverridden. Returns the zero-based index of the specified item.  
    Public MethodSets the specified item as the new CurrentItem. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public MethodSets the first item in the view as the new CurrentItem. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public MethodSets the last item in the view as the new CurrentItem. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public MethodSets the next item in the view as the new CurrentItem. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public MethodOverridden. Sets the item at the specified index as the new CurrentItem.  
    Public MethodSets the previous item in the view as the new CurrentItem. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public MethodReturns a value indicating whether the specified item in the underlying data source passes the filtering criteria, and is therefore included in the view. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public MethodRecreates the view. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public MethodOverloaded.   
    Public MethodRemoves the specified item from the underlying data source. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public MethodOverridden. Removes the item at the specified index from the underlying data source.  
    Public Method  
    Public Method  
    Top
    Public Events
     NameDescription
    Public EventRaised when the EditItem method has been called to signal that the edit process of an item in the underlying data source is about to begin. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public EventRaised when the CancelEdit method has been called to signal that the edit process of an item in the underlying data source is about to be canceled. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public EventRaised when the CancelNew method has been called to signal that the insertion process of a new item is about to be canceled. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public EventRaised when the CommitEdit method has been called to signal that modifications made to an item in the underlying data source are about to be committed. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public EventRaised when the CommitNew method has been called to signal that a new item is about to be committed to the underlying data source. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public EventRaised when the AddNew method has been called to signal that a new item is about to be created. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public Event (Inherited from System.Windows.Data.CollectionView)
    Public Event (Inherited from System.Windows.Data.CollectionView)
    Public EventRaised after the BeginningEdit event to signal that the edit process of an item in the underlying data source has begun. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public EventRaised after the CancelingEdit event to signal that the edit process of an item in the underlying data source has been canceled. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public EventRaised after the CommittingEdit event to signal that the modifications made to an item in the underlying data source have been committed. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public EventRaised after the CreatingNewItem event to allow the new item to be initialized. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public EventRaised after the RemovingItem event to signal that an item has been removed from the underlying data source. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public EventRaised after the CancelingNewItem event to signal that the insertion process of a new item has been canceled. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public EventRaised after the CommittingNewItem event to signal that a new item has been committed to the underlying data source. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public EventRaised after the CreatingNewItem and InitializingNewItem events to signal that a new item has been created. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Public EventRaised when the Remove or RemoveAt methods have been called to signal that an item is about to be removed from the underlying data source. (Inherited from Xceed.Wpf.DataGrid.DataGridCollectionViewBase)
    Top
    Protected Events
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also