ClassRadCollectionView<TDataItem>
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
RadCollectionView(IEnumerable<TDataItem>)
Declaration
public RadCollectionView(IEnumerable<TDataItem> collection)
Parameters
collection
IEnumerable<TDataItem>
Properties
BypassFilter
Gets or sets a value indicating whether filtering will be performed or it will be handled by the user/data source.
Declaration
[Browsable(false)]
public bool BypassFilter { get; set; }
Property Value
BypassSort
Gets or sets a value indicating whether sorting will be performed or it will be handled by the user/data source.
Declaration
[Browsable(false)]
public bool BypassSort { get; set; }
Property Value
CanChangePage
Gets a value that indicates whether the IPagedCollectionView.PageIndex value is allowed to change.
Declaration
public virtual bool CanChangePage { get; }
Property Value
true if the IPagedCollectionView.PageIndex value is allowed to change; otherwise, false.
Implements
CanFilter
Gets or sets a value indicating whether this data view can filter.
Declaration
public virtual bool CanFilter { get; set; }
Property Value
true if this instance can filter; otherwise, false.
Implements
CanGroup
Gets or sets a value indicating whether this data view can group.
Declaration
public virtual bool CanGroup { get; set; }
Property Value
true if this instance can group; otherwise, false.
Implements
CanPage
Gets or sets a value indicating whether this data view can be paginated.
Declaration
public virtual bool CanPage { get; set; }
Property Value
true if this data view can be paginated; otherwise, false.
Implements
CanSort
Gets or sets a value indicating whether this data view can sort.
Declaration
public virtual bool CanSort { get; set; }
Property Value
true if this instance can sort; otherwise, false.
Implements
CaseSensitive
Indicates whether string comparisons of data are case-sensitive.
Declaration
[Browsable(true)]
public bool CaseSensitive { get; set; }
Property Value
ChangeCurrentOnAdd
Gets or sets a value indicating whether [change current on add].
Declaration
public bool ChangeCurrentOnAdd { get; set; }
Property Value
true if [change current on add]; otherwise, false.
Comparer
Gets or sets the comparer.
Declaration
[Browsable(false)]
public virtual IComparer<TDataItem> Comparer { get; set; }
Property Value
IComparer<TDataItem>
The comparer.
Count
Gets the count.
CurrentItem
Gets or sets the current item.
Declaration
public TDataItem CurrentItem { get; }
Property Value
TDataItem
The current item.
Implements
CurrentPosition
Gets or sets the current position.
Declaration
public int CurrentPosition { get; protected set; }
Property Value
The current position.
Implements
DefaultFilter
Default callback so that the default filtering expression parser can be substituted.
Declaration
public virtual Predicate<TDataItem> DefaultFilter { get; }
Property Value
Predicate<TDataItem>
DefaultGroupPredicate
Gets the default group predicate.
Declaration
public virtual GroupPredicate<TDataItem> DefaultGroupPredicate { get; }
Property Value
GroupPredicate<TDataItem>
The default group predicate.
Filter
Provides a callback so that the default filtering expression parser can be substituted.
Declaration
public virtual Predicate<TDataItem> Filter { get; set; }
Property Value
Predicate<TDataItem>
Implements
FilterExpression
Gets or sets the filter expression.
Declaration
public virtual string FilterExpression { get; set; }
Property Value
The filter expression.
GroupComparer
Gets or sets the comparer.
Declaration
[Browsable(false)]
public virtual IComparer<Group<TDataItem>> GroupComparer { get; set; }
Property Value
IComparer<Group<TDataItem>>
The comparer.
Implements
GroupDescriptorCollectionFactory
This property is used internally.
Declaration
public IGroupDescriptorCollectionFactory GroupDescriptorCollectionFactory { get; set; }
Property Value
GroupDescriptors
Gets the group descriptions.
Declaration
public GroupDescriptorCollection GroupDescriptors { get; }
Property Value
The group descriptions.
Implements
GroupFactory
Declaration
public virtual IGroupFactory<TDataItem> GroupFactory { get; set; }
Property Value
IGroupFactory<TDataItem>
GroupPredicate
Declaration
public virtual GroupPredicate<TDataItem> GroupPredicate { get; set; }
Property Value
GroupPredicate<TDataItem>
Groups
Gets the groups.
Declaration
public virtual GroupCollection<TDataItem> Groups { get; }
Property Value
GroupCollection<TDataItem>
The groups.
Implements
HasFilter
Gets a value indicating whether this instance has filter applied.
Declaration
protected bool HasFilter { get; }
Property Value
true if this instance has filter applied; otherwise, false.
HasGroup
Gets a value indicating whether this instance has group applied.
Declaration
protected bool HasGroup { get; }
Property Value
true if this instance has group applied; otherwise, false.
HasSort
Gets a value indicating whether this instance has sort applied.
Declaration
protected bool HasSort { get; }
Property Value
true if this instance has sort applied; otherwise, false.
IsDynamic
Gets a value that indicates whether the underlying collection provides change notifications.
Declaration
public bool IsDynamic { get; }
Property Value
true if this instance is dynamic; otherwise, false.
IsEmpty
Gets a value indicating whether this item collection is empty.
Declaration
public bool IsEmpty { get; }
Property Value
true if this item collection is empty; otherwise, false.
IsIncrementalFiltering
Gets a value indicating whether this instance is incremental filtering.
Declaration
public bool IsIncrementalFiltering { get; }
Property Value
true if this instance is incremental filtering; otherwise, false.
IsPageChanging
Gets a value that indicates whether a page index change is in process.
Declaration
public virtual bool IsPageChanging { get; }
Property Value
true if the page index is changing; otherwise, false.
Implements
ItemCount
Gets the total number of items in the source collection.
Declaration
public virtual int ItemCount { get; }
Property Value
The total number of items in the source collection, or -1 if the total number is unknown.
Implements
Items
Declaration
protected virtual IList<TDataItem> Items { get; }
Property Value
IList<TDataItem>
PageIndex
Gets the zero-based index of the current page.
Declaration
public virtual int PageIndex { get; }
Property Value
The zero-based index of the current page.
Implements
PageSize
Gets or sets the number of items to display on a page.
Declaration
public virtual int PageSize { get; set; }
Property Value
The number of items to display on a page.
Implements
PagingBeforeGrouping
Gets or sets a value indicating whether paging is performed before grouping or vice versa.
Declaration
public virtual bool PagingBeforeGrouping { get; set; }
Property Value
true if paging is performed before grouping; otherwise, false.
SortDescriptorCollectionFactory
This property is used internally.
Declaration
public ISortDescriptorCollectionFactory SortDescriptorCollectionFactory { get; set; }
Property Value
SortDescriptors
Gets the sort descriptions.
Declaration
public SortDescriptorCollection SortDescriptors { get; }
Property Value
The sort descriptions.
Implements
SourceCollection
Gets the source collection.
Declaration
public virtual IEnumerable<TDataItem> SourceCollection { get; }
Property Value
IEnumerable<TDataItem>
The source collection.
Implements
TotalPages
Gets the total number of pages with the current page size.
Methods
ClearThreadedFilterNodes()
Declaration
public void ClearThreadedFilterNodes()
Contains(TDataItem)
Determines whether [contains] [the specified item].
Declaration
public bool Contains(TDataItem item)
Parameters
item
TDataItem
The item.
Returns
true if [contains] [the specified item]; otherwise, false.
Implements
ContainsGroup(Group<TDataItem>)
Determines whether the specified group is present within this view.
CopyTo(TDataItem[], int)
Copies to array.
Declaration
public void CopyTo(TDataItem[] array, int arrayIndex)
Parameters
array
TDataItem[]
The array.
arrayIndex
Index of the array.
DeferRefresh()
Defers the refresh.
EndUpdate(bool)
Resumes event notification.
Declaration
public void EndUpdate(bool notifyUpdates)
Parameters
notifyUpdates
EnsureDescriptors()
Declaration
public virtual void EnsureDescriptors()
EnsurePageIndex()
Ensures the index of the page is within the valid pages range.
Declaration
protected virtual void EnsurePageIndex()
Evaluate(string, IEnumerable<TDataItem>)
Evaluates the specified expression.
Evaluate(string, TDataItem)
Evaluates the specified expression.
Evaluate(string, int, int)
Evaluates the specified expression.
FilterEvaluate(FilterDescriptor, TDataItem)
Declaration
public bool FilterEvaluate(FilterDescriptor filterDescriptor, TDataItem item)
Parameters
filterDescriptor
item
TDataItem
Returns
Find(int, object)
Finds the specified item index.
FindGroup(Group<TDataItem>)
Searches the Groups collection for a match, using the Keys in the provided group.
GetEnumerator()
Declaration
public IEnumerator<TDataItem> GetEnumerator()
Returns
IEnumerator<TDataItem>
GetItemPage(TDataItem)
Declaration
public virtual int GetItemPage(TDataItem item)
Parameters
item
TDataItem
Returns
IndexOf(TDataItem)
Indexes the of.
Declaration
public virtual int IndexOf(TDataItem item)
Parameters
item
TDataItem
The item.
Returns
Implements
InitializeSource(IEnumerable<TDataItem>)
Declaration
protected virtual void InitializeSource(IEnumerable<TDataItem> collection)
Parameters
collection
IEnumerable<TDataItem>
LoadData(IEnumerable<TDataItem>)
Loads the data.
Declaration
public virtual void LoadData(IEnumerable<TDataItem> collection)
Parameters
collection
IEnumerable<TDataItem>
The collection.
MoveCurrentTo(TDataItem)
Moves the current to.
Declaration
public bool MoveCurrentTo(TDataItem item)
Parameters
item
TDataItem
The item.
Returns
Implements
MoveCurrentToFirst()
Moves the current to first.
MoveCurrentToLast()
Moves the current to last.
MoveCurrentToNext()
Moves the current to next.
MoveCurrentToPosition(int)
Moves the current to position.
MoveCurrentToPrevious()
Moves the current to previous.
MoveToFirstPage()
Sets the first page as the current page.
Declaration
public virtual bool MoveToFirstPage()
Returns
true if the operation was successful; otherwise, false.
Implements
MoveToLastPage()
Sets the last page as the current page.
Declaration
public virtual bool MoveToLastPage()
Returns
true if the operation was successful; otherwise, false.
Implements
MoveToNextPage()
Moves to the page after the current page.
Declaration
public virtual bool MoveToNextPage()
Returns
true if the operation was successful; otherwise, false.
Implements
MoveToPage(int)
Requests a page move to the page at the specified zero-based index.
MoveToPreviousPage()
Moves to the page before the current page.
Declaration
public virtual bool MoveToPreviousPage()
Returns
true if the operation was successful; otherwise, false.
Implements
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Declaration
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters
args
OnCurrentChanged(EventArgs)
Declaration
protected virtual void OnCurrentChanged(EventArgs args)
Parameters
args
OnCurrentChanging(CancelEventArgs)
Declaration
protected virtual void OnCurrentChanging(CancelEventArgs args)
Parameters
args
OnNotifyPropertyChanged(PropertyChangedEventArgs)
Raises the NotifyPropertyChanged event
Declaration
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters
e
OnPageChanged()
Fires the PageChanged event.
Declaration
protected virtual void OnPageChanged()
OnPageChanging(int)
Fires the PageChanging event. Returns the value of the Cancel event argument.
PassesFilter(TDataItem)
Passeses the filter.
Declaration
public virtual bool PassesFilter(TDataItem item)
Parameters
item
TDataItem
The item.
Returns
ProcessCollectionChanged(NotifyCollectionChangedEventArgs)
Declaration
protected virtual void ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters
args
Refresh()
Refreshes this data view.
Declaration
public virtual void Refresh()
Implements
RefreshOverride()
Declaration
protected virtual void RefreshOverride()
SetCurrentPositionCore(int, bool)
The core update routine for the current position.
SetCurrentPositionCore(int, bool, CurrentChangeReason)
Declaration
protected bool SetCurrentPositionCore(int newPosition, bool forceNotify, CurrentChangeReason reason)
Parameters
newPosition
forceNotify
reason
Returns
VersionUpdateNeeded(NotifyCollectionChangedEventArgs)
Declaration
protected virtual bool VersionUpdateNeeded(NotifyCollectionChangedEventArgs args)
Parameters
args
Returns
Events
CollectionChanged
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Value
Implements
CurrentChanged
Declaration
public event EventHandler CurrentChanged
Event Value
Implements
CurrentChanging
Declaration
public event CancelEventHandler CurrentChanging
Event Value
Implements
PageChanged
Occurs when the IPagedCollectionView.PageIndex has changed.
Declaration
public event EventHandler<EventArgs> PageChanged
Event Value
Implements
PageChanging
Occurs before the IPagedCollectionView.PageIndex is changed.
Declaration
public event EventHandler<PageChangingEventArgs> PageChanging
Event Value
Implements
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Value
Implements