Class RadCollectionView<TDataItem>
Inheritance
Inherited Members
Namespace: Telerik.WinControls.Data
Assembly: Telerik.WinControls.dll
Syntax
public abstract class RadCollectionView<TDataItem> : ICollectionView<TDataItem>, IPagedCollectionView, IReadOnlyCollection<TDataItem>, IEnumerable<TDataItem>, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged where TDataItem : IDataItem
Type Parameters
TDataItem
|
Constructors
RadCollectionView(IEnumerable<TDataItem>)
Declaration
public RadCollectionView(IEnumerable<TDataItem> collection)
Parameters
System.
|
Properties
BypassFilter
Gets or sets a value indicating whether filtering will be performed or it will be handled by the user/data source.
Declaration
public bool BypassFilter { get; set; }
Property Value
System.
|
BypassSort
Gets or sets a value indicating whether sorting will be performed or it will be handled by the user/data source.
Declaration
public bool BypassSort { get; set; }
Property Value
System.
|
CanChangePage
Gets a value that indicates whether the IPagedCollectionView.PageIndex value is allowed to change.
Declaration
public virtual bool CanChangePage { get; }
Property Value
System. 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
System.
|
Implements
CanGroup
Gets or sets a value indicating whether this data view can group.
Declaration
public virtual bool CanGroup { get; set; }
Property Value
System.
|
Implements
CanPage
Gets or sets a value indicating whether this data view can be paginated.
Declaration
public virtual bool CanPage { get; set; }
Property Value
System.
|
Implements
CanSort
Gets or sets a value indicating whether this data view can sort.
Declaration
public virtual bool CanSort { get; set; }
Property Value
System.
|
Implements
CaseSensitive
Indicates whether string comparisons of data are case-sensitive.
Declaration
public bool CaseSensitive { get; set; }
Property Value
System.
|
ChangeCurrentOnAdd
Gets or sets a value indicating whether [change current on add].
Declaration
public bool ChangeCurrentOnAdd { get; set; }
Property Value
System.
|
Comparer
Gets or sets the comparer.
Declaration
public virtual IComparer<TDataItem> Comparer { get; set; }
Property Value
System. The comparer. |
Count
Gets the count.
Declaration
public int Count { get; }
Property Value
System. The count. |
Implements
CurrentItem
Gets or sets the current item.
Declaration
public TDataItem CurrentItem { get; }
Property Value
TData The current item. |
Implements
CurrentPosition
Gets or sets the current position.
Declaration
public int CurrentPosition { get; protected set; }
Property Value
System. 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
System.
|
DefaultGroupPredicate
Gets the default group predicate.
Declaration
public virtual GroupPredicate<TDataItem> DefaultGroupPredicate { get; }
Property Value
Group 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
System.
|
Implements
FilterExpression
Gets or sets the filter expression.
Declaration
public virtual string FilterExpression { get; set; }
Property Value
System. The filter expression. |
GroupComparer
Gets or sets the comparer.
Declaration
public virtual IComparer<Group<TDataItem>> GroupComparer { get; set; }
Property Value
System. 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
Group The group descriptions. |
Implements
GroupFactory
Declaration
public virtual IGroupFactory<TDataItem> GroupFactory { get; set; }
Property Value
IGroup
|
GroupPredicate
Declaration
public virtual GroupPredicate<TDataItem> GroupPredicate { get; set; }
Property Value
Group
|
Groups
Gets the groups.
Declaration
public virtual GroupCollection<TDataItem> Groups { get; }
Property Value
Group The groups. |
Implements
HasDataOperation
Declaration
protected bool HasDataOperation { get; }
Property Value
System.
|
HasFilter
Gets a value indicating whether this instance has filter applied.
Declaration
protected bool HasFilter { get; }
Property Value
System.
|
HasGroup
Gets a value indicating whether this instance has group applied.
Declaration
protected bool HasGroup { get; }
Property Value
System.
|
HasSort
Gets a value indicating whether this instance has sort applied.
Declaration
protected bool HasSort { get; }
Property Value
System.
|
IsDynamic
Gets a value that indicates whether the underlying collection provides change notifications.
Declaration
public bool IsDynamic { get; }
Property Value
System.
|
IsEmpty
Gets a value indicating whether this item collection is empty.
Declaration
public bool IsEmpty { get; }
Property Value
System.
|
IsIncrementalFiltering
Gets a value indicating whether this instance is incremental filtering.
Declaration
public bool IsIncrementalFiltering { get; }
Property Value
System.
|
IsInUpdate
Declaration
protected bool IsInUpdate { get; }
Property Value
System.
|
IsPageChanging
Gets a value that indicates whether a page index change is in process.
Declaration
public virtual bool IsPageChanging { get; }
Property Value
System. true if the page index is changing; otherwise, false. |
Implements
Item[Int32]
Gets the item at the specified index.
Declaration
public TDataItem this[int index] { get; }
Parameters
System.
|
Property Value
TData
|
Implements
ItemCount
Gets the total number of items in the source collection.
Declaration
public virtual int ItemCount { get; }
Property Value
System. 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
System.
|
PageIndex
Gets the zero-based index of the current page.
Declaration
public virtual int PageIndex { get; }
Property Value
System. 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
System. 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
System.
|
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
Sort The sort descriptions. |
Implements
SourceCollection
Gets the source collection.
Declaration
public virtual IEnumerable<TDataItem> SourceCollection { get; }
Property Value
System. The source collection. |
Implements
TotalPages
Gets the total number of pages with the current page size.
Declaration
public virtual int TotalPages { get; }
Property Value
System.
|
Version
Gets a value indicating the current version of the view.
Declaration
public int Version { get; }
Property Value
System.
|
Methods
BeginUpdate()
Suspends event notification.
Declaration
public void BeginUpdate()
ClearThreadedFilterNodes()
Declaration
public void ClearThreadedFilterNodes()
Contains(TDataItem)
Determines whether [contains] [the specified item].
Declaration
public bool Contains(TDataItem item)
Parameters
TData The item. |
Returns
System.
|
Implements
ContainsGroup(Group<TDataItem>)
Determines whether the specified group is present within this view.
Declaration
public bool ContainsGroup(Group<TDataItem> group)
Parameters
Group<TDataItem>
group
|
Returns
System.
|
CopyTo(TDataItem[], Int32)
Copies to array.
Declaration
public void CopyTo(TDataItem[] array, int arrayIndex)
Parameters
TDataItem[]
array
The array. |
System. Index of the array. |
DeferRefresh()
Defers the refresh.
Declaration
public virtual IDisposable DeferRefresh()
Returns
System.
|
EndUpdate()
Resumes event notification.
Declaration
public void EndUpdate()
EndUpdate(Boolean)
Resumes event notification.
Declaration
public void EndUpdate(bool notifyUpdates)
Parameters
System.
|
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, TDataItem)
Evaluates the specified expression.
Declaration
public object Evaluate(string expression, TDataItem item)
Parameters
System. The expression. |
TData The item. |
Returns
System.
|
Evaluate(String, IEnumerable<TDataItem>)
Evaluates the specified expression.
Declaration
public object Evaluate(string expression, IEnumerable<TDataItem> items)
Parameters
System. The expression. |
System. The items. |
Returns
System.
|
Evaluate(String, Int32, Int32)
Evaluates the specified expression.
Declaration
public object Evaluate(string expression, int startIndex, int count)
Parameters
System. The expression. |
System. The start index. |
System. The count. |
Returns
System.
|
FilterEvaluate(FilterDescriptor, TDataItem)
Declaration
public bool FilterEvaluate(FilterDescriptor filterDescriptor, TDataItem item)
Parameters
Filter
|
TData
|
Returns
System.
|
Find(Int32, Object)
Finds the specified item index.
Declaration
public virtual TDataItem Find(int itemIndex, object dataBoundItem)
Parameters
System. Index of the item. |
System. The data bound item. |
Returns
TData
|
FindGroup(Group<TDataItem>)
Searches the Groups collection for a match, using the Keys in the provided group.
Declaration
public Group<TDataItem> FindGroup(Group<TDataItem> group)
Parameters
Group<TDataItem>
group
|
Returns
Group<TDataItem>
|
GetEnumerator()
Declaration
public IEnumerator<TDataItem> GetEnumerator()
Returns
System.
|
Implements
GetFieldValue(TDataItem, String)
Declaration
protected virtual object GetFieldValue(TDataItem item, string fieldName)
Parameters
TData
|
System.
|
Returns
System.
|
GetItemPage(TDataItem)
Declaration
public virtual int GetItemPage(TDataItem item)
Parameters
TData
|
Returns
System.
|
IndexOf(TDataItem)
Indexes the of.
Declaration
public virtual int IndexOf(TDataItem item)
Parameters
TData The item. |
Returns
System.
|
Implements
InitializeSource(IEnumerable<TDataItem>)
Declaration
protected virtual void InitializeSource(IEnumerable<TDataItem> collection)
Parameters
System.
|
LazyRefresh()
This method is used internally.
Declaration
public void LazyRefresh()
LoadData(IEnumerable<TDataItem>)
Loads the data.
Declaration
public virtual void LoadData(IEnumerable<TDataItem> collection)
Parameters
System. The collection. |
MoveCurrentTo(TDataItem)
Moves the current to.
Declaration
public bool MoveCurrentTo(TDataItem item)
Parameters
TData The item. |
Returns
System.
|
Implements
MoveCurrentToFirst()
Moves the current to first.
Declaration
public bool MoveCurrentToFirst()
Returns
System.
|
Implements
MoveCurrentToLast()
Moves the current to last.
Declaration
public bool MoveCurrentToLast()
Returns
System.
|
Implements
MoveCurrentToNext()
Moves the current to next.
Declaration
public bool MoveCurrentToNext()
Returns
System.
|
Implements
MoveCurrentToPosition(Int32)
Moves the current to position.
Declaration
public bool MoveCurrentToPosition(int newPosition)
Parameters
System. The position. |
Returns
System.
|
Implements
MoveCurrentToPrevious()
Moves the current to previous.
Declaration
public bool MoveCurrentToPrevious()
Returns
System.
|
Implements
MoveToFirstPage()
Sets the first page as the current page.
Declaration
public virtual bool MoveToFirstPage()
Returns
System. true if the operation was successful; otherwise, false. |
Implements
MoveToLastPage()
Sets the last page as the current page.
Declaration
public virtual bool MoveToLastPage()
Returns
System. true if the operation was successful; otherwise, false. |
Implements
MoveToNextPage()
Moves to the page after the current page.
Declaration
public virtual bool MoveToNextPage()
Returns
System. true if the operation was successful; otherwise, false. |
Implements
MoveToPage(Int32)
Requests a page move to the page at the specified zero-based index.
Declaration
public virtual bool MoveToPage(int pageIndex)
Parameters
System. The zero-based index of the page to move to. |
Returns
System. true if the operation was successful; otherwise, false. |
Implements
MoveToPreviousPage()
Moves to the page before the current page.
Declaration
public virtual bool MoveToPreviousPage()
Returns
System. true if the operation was successful; otherwise, false. |
Implements
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Declaration
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters
OnCurrentChanged(EventArgs)
Declaration
protected virtual void OnCurrentChanged(EventArgs args)
Parameters
System.
|
OnCurrentChanging(CancelEventArgs)
Declaration
protected virtual void OnCurrentChanging(CancelEventArgs args)
Parameters
System.
|
OnNotifyPropertyChanged(PropertyChangedEventArgs)
Raises the NotifyPropertyChanged event
Declaration
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters
System.
|
OnPageChanged()
Fires the PageChanged event.
Declaration
protected virtual void OnPageChanged()
OnPageChanging(Int32)
Fires the PageChanging event. Returns the value of the Cancel event argument.
Declaration
protected virtual bool OnPageChanging(int newIndex)
Parameters
System. The new index. |
Returns
System. True if the event was canceled, otherwise false. |
PassesFilter(TDataItem)
Passeses the filter.
Declaration
public virtual bool PassesFilter(TDataItem item)
Parameters
TData The item. |
Returns
System.
|
ProcessCollectionChanged(NotifyCollectionChangedEventArgs)
Declaration
protected virtual void ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters
Refresh()
Refreshes this data view.
Declaration
public virtual void Refresh()
Implements
RefreshOverride()
Declaration
protected virtual void RefreshOverride()
SetCurrentPositionCore(Int32, Boolean)
The core update routine for the current position.
Declaration
protected virtual bool SetCurrentPositionCore(int newPosition, bool forceNotify)
Parameters
System. New position of the current item. |
System. True to raise CurrentChanged regardless of whether actual position change is available. |
Returns
System.
|
SetCurrentPositionCore(Int32, Boolean, CurrentChangeReason)
Declaration
protected bool SetCurrentPositionCore(int newPosition, bool forceNotify, CurrentChangeReason reason)
Parameters
System.
|
System.
|
Current
|
Returns
System.
|
TryEvaluate(String, IEnumerable<TDataItem>, Int32, out Object)
Try to evaluate the specified expression.
Declaration
public bool TryEvaluate(string expression, IEnumerable<TDataItem> items, int index, out object result)
Parameters
System. The expression. |
System. The items. |
System. Index of item, which the result will be calculated for |
System. Expression result |
Returns
System.
|
TryEvaluate(String, IEnumerable<TDataItem>, out Object)
This method is used internally.
Declaration
public bool TryEvaluate(string expression, IEnumerable<TDataItem> items, out object result)
Parameters
System.
|
System.
|
System.
|
Returns
System.
|
VersionUpdateNeeded(NotifyCollectionChangedEventArgs)
Declaration
protected virtual bool VersionUpdateNeeded(NotifyCollectionChangedEventArgs args)
Parameters
Returns
System.
|
Events
CollectionChanged
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
Implements
CurrentChanged
Declaration
public event EventHandler CurrentChanged
Event Type
System.
|
Implements
CurrentChanging
Declaration
public event CancelEventHandler CurrentChanging
Event Type
System.
|
Implements
PageChanged
Occurs when the IPagedCollectionView.PageIndex has changed.
Declaration
public event EventHandler<EventArgs> PageChanged
Event Type
System.
|
Implements
PageChanging
Occurs before the IPagedCollectionView.PageIndex is changed.
Declaration
public event EventHandler<PageChangingEventArgs> PageChanging
Event Type
System.
|
Implements
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.
|
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.
|
Implements
IReadOnlyCollection<TDataItem>.CopyTo(TDataItem[], Int32)
Declaration
void IReadOnlyCollection<TDataItem>.CopyTo(TDataItem[] array, int index)
Parameters
TDataItem[]
array
|
System.
|