Class BindingListCollectionView
ICollectionView based on and associated to IBindingList and IBindingListView, namely ADO DataViews.
public sealed class BindingListCollectionView : CollectionView, IBaseObject, IDisposableObject, IDisposable, ICollectionView, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged, IComparer, IEditableCollectionView, ICollectionViewLiveShaping, IItemProperties
- Inheritance
-
BindingListCollectionView
- Implements
Constructors
- BindingListCollectionView(IBindingList)
Constructor
Properties
- CanCancelEdit
Returns true if the view supports the notion of "pending changes" on the current edit item. This may vary, depending on the view and the particular item. For example, a view might return true if the current edit item implements IEditableObject, or if the view has special knowledge about the item that it can use to support rollback of pending changes.
- CanChangeLiveFiltering
Gets a value that indicates whether this view supports turning live filtering on or off.
- CanChangeLiveGrouping
Gets a value that indicates whether this view supports turning live grouping on or off.
- CanChangeLiveSorting
Gets a value that indicates whether this view supports turning live sorting on or off.
- CanCustomFilter
Test if this CollectionView supports custom filtering before assigning a filter string to CustomFilter.
- CanFilter
BindingListCollectionView does not support callback-based filtering. Use CustomFilter instead.
- CanGroup
Returns true if this view really supports grouping. When this returns false, the rest of the interface is ignored.
- CanRemove
Return true if the view supports Remove(object) and RemoveAt(int).
- CanSort
Test if this ICollectionView supports sorting before adding to SortDescriptions.
- Count
Return the estimated number of records (or -1, meaning "don't know").
- CurrentAddItem
When an AddNew() transaction is in progress, this property returns the new item. Otherwise it returns null.
- CurrentEditItem
When an EditItem(object) transaction is in progress, this property returns the affected item. Otherwise it returns null.
- CustomFilter
Gets or sets the filter to be used to exclude items from the collection of items returned by the data source .
- GroupBySelector
A delegate to select the group description as a function of the parent group and its level.
- GroupDescriptions
The description of grouping, indexed by level.
- Groups
The top-level groups, constructed according to the descriptions given in GroupDescriptions and/or GroupBySelector.
- IsAddingNew
Returns true if an AddNew() transaction is in progress.
- IsDataInGroupOrder
Setting this to true informs the view that the list of items (after applying the sort and filter, if any) is already in the correct order for grouping. This allows the view to use a more efficient algorithm to build the groups.
- IsEditingItem
Returns true if an EditItem(object) transaction is in progress.
- IsEmpty
Returns true if the resulting (filtered) view is emtpy.
- IsLiveFiltering
Gets or sets a value that indicates whether live filtering is enabled. The value may be null if the view does not know whether live filtering is enabled. Calling the setter when CanChangeLiveFiltering is false will throw an InvalidOperationException.
- IsLiveGrouping
Gets or sets a value that indicates whether live grouping is enabled. The value may be null if the view does not know whether live grouping is enabled. Calling the setter when CanChangeLiveGrouping is false will throw an InvalidOperationException.
- IsLiveSorting
Gets or sets a value that indicates whether live sorting is enabled. The value may be null if the view does not know whether live sorting is enabled. Calling the setter when CanChangeLiveSorting is false will throw an InvalidOperationException.
- ItemProperties
Returns information about the properties available on items in the underlying collection. This information may come from a schema, from a type descriptor, from a representative item, or from some other source known to the view.
- LiveFilteringProperties
Gets a collection of strings describing the properties that trigger a live-filtering recalculation. The strings use the same format as SortDescription.PropertyName.
- LiveGroupingProperties
Gets a collection of strings describing the properties that trigger a live-grouping recalculation. The strings use the same format as PropertyGroupDescription.PropertyName.
- LiveSortingProperties
Gets a collection of strings describing the properties that trigger a live-sorting recalculation. The strings use the same format as SortDescription.PropertyName.
- NewItemPlaceholderPosition
Indicates whether to include a placeholder for a new item, and if so, where to put it.
- SortDescriptions
Collection of Sort criteria to sort items in this view over the inner IBindingList.
Methods
- AddNew()
Add a new item to the underlying collection. Returns the new item. After calling AddNew and changing the new item as desired, either CommitNew() or CancelNew() should be called to complete the transaction.
- CancelEdit()
Complete the transaction started by EditItem(object). The pending changes (if any) to the item are discarded.
- CancelNew()
Complete the transaction started by AddNew(). The new item is removed from the collection.
- CommitEdit()
Complete the transaction started by EditItem(object). The pending changes (if any) to the item are committed.
- CommitNew()
Complete the transaction started by AddNew(). The new item remains in the collection, and the view's sort, filter, and grouping specifications (if any) are applied to the new item.
- Contains(object)
Return true if the item belongs to this view. No assumptions are made about the item. This method will behave similarly to IList.Contains().
- DetachFromSourceCollection()
Detach from the source collection. (I.e. stop listening to the collection's events, or anything else that makes the CollectionView ineligible for garbage collection.)
- EditItem(object)
Begins an editing transaction on the given item. The transaction is completed by calling either CommitEdit() or CancelEdit(). Any changes made to the item during the transaction are considered "pending", provided that the view supports the notion of "pending changes" for the given item.
- GetEnumerator()
Implementation of IEnumerable.GetEnumerator(). This provides a way to enumerate the members of the collection without changing the currency.
- GetItemAt(int)
Retrieve item at the given zero-based index in this CollectionView.
- IndexOf(object)
Return the index where the given item belongs, or -1 if this index is unknown.
- MoveCurrentToPosition(int)
Move CurrentItem to the item at the given index.
- OnAllowsCrossThreadChangesChanged()
This method is called when the value of AllowsCrossThreadChanges is changed. It gives a derived class an opportunity to initialize its support for cross-thread changes (or to retire that support).
- OnBeginChangeLogging(NotifyCollectionChangedEventArgs)
Obsolete. Retained for compatibility. Use OnAllowsCrossThreadChangesChanged instead.
- PassesFilter(object)
Return true if the item belongs to this view. The item is assumed to belong to the underlying DataCollection; this method merely takes filters into account. It is commonly used during collection-changed notifications to determine if the added/removed item requires processing. Returns true if no filter is set on collection view.
- ProcessCollectionChanged(NotifyCollectionChangedEventArgs)
Must be implemented by the derived classes to process a single change on the UIContext. The UIContext will have allready been entered by now.
- RefreshOverride()
Re-create the view over the associated IList
- Remove(object)
Remove the given item from the underlying collection.
- RemoveAt(int)
Remove the item at the given index from the underlying collection. The index is interpreted with respect to the view (not with respect to the underlying collection).