Provides an abstract base class for collection views that support filtering, sorting, grouping, and paging operations on strongly-typed data item collections.
Definition
Namespace:Telerik.WinControls.Data
Assembly:Telerik.WinControls.dll
Type Parameters:
TDataItem
The type of data items in the collection, which must implement IDataItem.
Syntax:
public abstract class RadCollectionView<TDataItem> : ICollectionView<TDataItem>, IPagedCollectionView, IReadOnlyCollection<TDataItem>, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged where TDataItem : IDataItem
Inheritance: objectRadCollectionView<TDataItem>
Derived Classes:
Implements:
Constructors
public RadCollectionView(IEnumerable<TDataItem> collection)
Properties
Gets or sets a value indicating whether filtering will be performed or it will be handled by the user/data source.
[Browsable(false)]
public bool BypassFilter { get; set; }
Gets or sets a value indicating whether sorting will be performed or it will be handled by the user/data source.
[Browsable(false)]
public bool BypassSort { get; set; }
Gets a value that indicates whether the IPagedCollectionView.PageIndex value is allowed to change.
public virtual bool CanChangePage { get; }
true if the IPagedCollectionView.PageIndex value is allowed to change; otherwise, false.
Implements:
Gets or sets a value indicating whether this data view can filter.
public virtual bool CanFilter { get; set; }
true if this instance can filter; otherwise, false.
Implements:
Gets or sets a value indicating whether this data view can group.
public virtual bool CanGroup { get; set; }
true if this instance can group; otherwise, false.
Implements:
Gets or sets a value indicating whether this data view can be paginated.
public virtual bool CanPage { get; set; }
true if this data view can be paginated; otherwise, false.
Implements:
Gets or sets a value indicating whether this data view can sort.
public virtual bool CanSort { get; set; }
true if this instance can sort; otherwise, false.
Implements:
Indicates whether string comparisons of data are case-sensitive.
[Browsable(true)]
public bool CaseSensitive { get; set; }
Gets or sets a value indicating whether [change current on add].
public bool ChangeCurrentOnAdd { get; set; }
true if [change current on add]; otherwise, false.
Comparer
IComparer<TDataItem>
Gets or sets the comparer.
[Browsable(false)]
public virtual IComparer<TDataItem> Comparer { get; set; }
The comparer.
CurrentItem
TDataItem
Gets or sets the current item.
public TDataItem CurrentItem { get; }
The current item.
Implements:
Gets or sets the current position.
public int CurrentPosition { get; protected set; }
The current position.
Implements:
DefaultFilter
Predicate<TDataItem>
Default callback so that the default filtering expression parser can be substituted.
public virtual Predicate<TDataItem> DefaultFilter { get; }
DefaultGroupPredicate
GroupPredicate<TDataItem>
Gets the default group predicate.
public virtual GroupPredicate<TDataItem> DefaultGroupPredicate { get; }
The default group predicate.
Provides a callback so that the default filtering expression parser can be substituted.
public virtual Predicate<TDataItem> Filter { get; set; }
Implements:
Gets or sets the filter expression.
public virtual string FilterExpression { get; set; }
The filter expression.
GroupComparer
IComparer<Group<TDataItem>>
Gets or sets the comparer.
[Browsable(false)]
public virtual IComparer<Group<TDataItem>> GroupComparer { get; set; }
The comparer.
Implements:
This property is used internally.
public IGroupDescriptorCollectionFactory GroupDescriptorCollectionFactory { get; set; }
Gets the group descriptions.
public GroupDescriptorCollection GroupDescriptors { get; }
The group descriptions.
Implements:
GroupFactory
IGroupFactory<TDataItem>
public virtual IGroupFactory<TDataItem> GroupFactory { get; set; }
GroupPredicate
GroupPredicate<TDataItem>
public virtual GroupPredicate<TDataItem> GroupPredicate { get; set; }
Groups
GroupCollection<TDataItem>
Gets the groups.
public virtual GroupCollection<TDataItem> Groups { get; }
The groups.
Implements:
protected bool HasDataOperation { get; }
Gets a value indicating whether this instance has filter applied.
protected bool HasFilter { get; }
true if this instance has filter applied; otherwise, false.
Gets a value indicating whether this instance has group applied.
protected bool HasGroup { get; }
true if this instance has group applied; otherwise, false.
Gets a value indicating whether this instance has sort applied.
protected bool HasSort { get; }
true if this instance has sort applied; otherwise, false.
Gets a value that indicates whether the underlying collection provides change notifications.
public bool IsDynamic { get; }
true if this instance is dynamic; otherwise, false.
Gets a value indicating whether this item collection is empty.
public bool IsEmpty { get; }
true if this item collection is empty; otherwise, false.
Gets a value indicating whether this instance is incremental filtering.
public bool IsIncrementalFiltering { get; }
true if this instance is incremental filtering; otherwise, false.
protected bool IsInUpdate { get; }
Gets a value that indicates whether a page index change is in process.
public virtual bool IsPageChanging { get; }
true if the page index is changing; otherwise, false.
Implements:
Gets the total number of items in the source collection.
public virtual int ItemCount { get; }
The total number of items in the source collection, or -1 if the total number is unknown.
Implements:
Items
IList<TDataItem>
protected virtual IList<TDataItem> Items { get; }
Gets the zero-based index of the current page.
public virtual int PageIndex { get; }
The zero-based index of the current page.
Implements:
Gets or sets the number of items to display on a page.
public virtual int PageSize { get; set; }
The number of items to display on a page.
Implements:
Gets or sets a value indicating whether paging is performed before grouping or vice versa.
public virtual bool PagingBeforeGrouping { get; set; }
true if paging is performed before grouping; otherwise, false.
This property is used internally.
public ISortDescriptorCollectionFactory SortDescriptorCollectionFactory { get; set; }
Gets the sort descriptions.
public SortDescriptorCollection SortDescriptors { get; }
The sort descriptions.
Implements:
SourceCollection
IEnumerable<TDataItem>
Gets the source collection.
public virtual IEnumerable<TDataItem> SourceCollection { get; }
The source collection.
Implements:
this[int]
TDataItem
Gets the item at the specified index.
Gets the total number of pages with the current page size.
public virtual int TotalPages { get; }
Methods
Suspends event notification.
public void BeginUpdate()
public void ClearThreadedFilterNodes()
Determines whether [contains] [the specified item].
public bool Contains(TDataItem item)
The item.
Returns:true if [contains] [the specified item]; otherwise, false.
Implements:
Copies to array.
public void CopyTo(TDataItem[] array, int arrayIndex)
The array.
arrayIndexintIndex of the array.
Defers the refresh.
Resumes event notification.
public void EndUpdate()
Resumes event notification.
public virtual void EnsureDescriptors()
Ensures the index of the page is within the valid pages range.
protected virtual void EnsurePageIndex()
public bool FilterEvaluate(FilterDescriptor filterDescriptor, TDataItem item)
public IEnumerator<TDataItem> GetEnumerator()
IEnumerator<TDataItem>
Indexes the of.
public virtual int IndexOf(TDataItem item)
The item.
Returns:Implements:
protected virtual void InitializeSource(IEnumerable<TDataItem> collection)
Loads the data.
public virtual void LoadData(IEnumerable<TDataItem> collection)
The collection.
Moves the current to.
public bool MoveCurrentTo(TDataItem item)
The item.
Returns:Implements:
Moves the current to first.
Moves the current to last.
Moves the current to next.
Moves the current to previous.
Sets the first page as the current page.
public virtual bool MoveToFirstPage()
true if the operation was successful; otherwise, false.
Implements:
Sets the last page as the current page.
public virtual bool MoveToLastPage()
true if the operation was successful; otherwise, false.
Implements:
Moves to the page after the current page.
public virtual bool MoveToNextPage()
true if the operation was successful; otherwise, false.
Implements:
Moves to the page before the current page.
public virtual bool MoveToPreviousPage()
true if the operation was successful; otherwise, false.
Implements:
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Raises the NotifyPropertyChanged event
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Fires the PageChanged event.
protected virtual void OnPageChanged()
Passeses the filter.
protected virtual void ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
Refreshes this data view.
public virtual void Refresh()
Implements:
protected virtual void RefreshOverride()
protected bool SetCurrentPositionCore(int newPosition, bool forceNotify, CurrentChangeReason reason)
The core update routine for the current position.
protected virtual bool VersionUpdateNeeded(NotifyCollectionChangedEventArgs args)
Events
public event NotifyCollectionChangedEventHandler CollectionChanged
Implements:
public event EventHandler CurrentChanged
Implements:
public event CancelEventHandler CurrentChanging
Implements:
Occurs when the IPagedCollectionView.PageIndex has changed.
public event EventHandler<EventArgs> PageChanged
Implements:
Occurs before the IPagedCollectionView.PageIndex is changed.
public event EventHandler<PageChangingEventArgs> PageChanging
Implements:
public event PropertyChangedEventHandler PropertyChanged
Implements: