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.Collections.Generic.IEnumerable<TDataItem>
collection
|
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.Boolean
|
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.Boolean
|
CanChangePage
Gets a value that indicates whether the IPagedCollectionView.PageIndex value is allowed to change.
Declaration
public virtual bool CanChangePage { get; }
Property Value
System.Boolean
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.Boolean
|
Implements
CanGroup
Gets or sets a value indicating whether this data view can group.
Declaration
public virtual bool CanGroup { get; set; }
Property Value
System.Boolean
|
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.Boolean
|
Implements
CanSort
Gets or sets a value indicating whether this data view can sort.
Declaration
public virtual bool CanSort { get; set; }
Property Value
System.Boolean
|
Implements
CaseSensitive
Indicates whether string comparisons of data are case-sensitive.
Declaration
public bool CaseSensitive { get; set; }
Property Value
System.Boolean
|
ChangeCurrentOnAdd
Gets or sets a value indicating whether [change current on add].
Declaration
public bool ChangeCurrentOnAdd { get; set; }
Property Value
System.Boolean
|
Comparer
Gets or sets the comparer.
Declaration
public virtual IComparer<TDataItem> Comparer { get; set; }
Property Value
System.Collections.Generic.IComparer<TDataItem>
The comparer. |
Count
Gets the count.
Declaration
public int Count { get; }
Property Value
System.Int32
The count. |
Implements
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
System.Int32
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.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
System.Predicate<TDataItem>
|
Implements
FilterExpression
Gets or sets the filter expression.
Declaration
public virtual string FilterExpression { get; set; }
Property Value
System.String
The filter expression. |
GroupComparer
Gets or sets the comparer.
Declaration
public virtual IComparer<Group<TDataItem>> GroupComparer { get; set; }
Property Value
System.Collections.Generic.IComparer<Group<TDataItem>>
The comparer. |
Implements
GroupDescriptorCollectionFactory
This property is used internally.
Declaration
public IGroupDescriptorCollectionFactory GroupDescriptorCollectionFactory { get; set; }
Property Value
IGroupDescriptorCollectionFactory
|
GroupDescriptors
Gets the group descriptions.
Declaration
public GroupDescriptorCollection GroupDescriptors { get; }
Property Value
GroupDescriptorCollection
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
HasDataOperation
Declaration
protected bool HasDataOperation { get; }
Property Value
System.Boolean
|
HasFilter
Gets a value indicating whether this instance has filter applied.
Declaration
protected bool HasFilter { get; }
Property Value
System.Boolean
|
HasGroup
Gets a value indicating whether this instance has group applied.
Declaration
protected bool HasGroup { get; }
Property Value
System.Boolean
|
HasSort
Gets a value indicating whether this instance has sort applied.
Declaration
protected bool HasSort { get; }
Property Value
System.Boolean
|
IsDynamic
Gets a value that indicates whether the underlying collection provides change notifications.
Declaration
public bool IsDynamic { get; }
Property Value
System.Boolean
|
IsEmpty
Gets a value indicating whether this item collection is empty.
Declaration
public bool IsEmpty { get; }
Property Value
System.Boolean
|
IsIncrementalFiltering
Gets a value indicating whether this instance is incremental filtering.
Declaration
public bool IsIncrementalFiltering { get; }
Property Value
System.Boolean
|
IsInUpdate
Declaration
protected bool IsInUpdate { get; }
Property Value
System.Boolean
|
IsPageChanging
Gets a value that indicates whether a page index change is in process.
Declaration
public virtual bool IsPageChanging { get; }
Property Value
System.Boolean
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.Int32
index
|
Property Value
TDataItem
|
Implements
ItemCount
Gets the total number of items in the source collection.
Declaration
public virtual int ItemCount { get; }
Property Value
System.Int32
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.Collections.Generic.IList<TDataItem>
|
PageIndex
Gets the zero-based index of the current page.
Declaration
public virtual int PageIndex { get; }
Property Value
System.Int32
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.Int32
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.Boolean
|
SortDescriptorCollectionFactory
This property is used internally.
Declaration
public ISortDescriptorCollectionFactory SortDescriptorCollectionFactory { get; set; }
Property Value
ISortDescriptorCollectionFactory
|
SortDescriptors
Gets the sort descriptions.
Declaration
public SortDescriptorCollection SortDescriptors { get; }
Property Value
SortDescriptorCollection
The sort descriptions. |
Implements
SourceCollection
Gets the source collection.
Declaration
public virtual IEnumerable<TDataItem> SourceCollection { get; }
Property Value
System.Collections.Generic.IEnumerable<TDataItem>
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.Int32
|
Version
Gets a value indicating the current version of the view.
Declaration
public int Version { get; }
Property Value
System.Int32
|
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
TDataItem
item
The item. |
Returns
System.Boolean
|
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.Boolean
|
CopyTo(TDataItem[], Int32)
Copies to array.
Declaration
public void CopyTo(TDataItem[] array, int arrayIndex)
Parameters
TDataItem[]
array
The array. |
System.Int32
arrayIndex
Index of the array. |
DeferRefresh()
Defers the refresh.
Declaration
public virtual IDisposable DeferRefresh()
Returns
System.IDisposable
|
EndUpdate()
Resumes event notification.
Declaration
public void EndUpdate()
EndUpdate(Boolean)
Resumes event notification.
Declaration
public void EndUpdate(bool notifyUpdates)
Parameters
System.Boolean
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, TDataItem)
Evaluates the specified expression.
Declaration
public object Evaluate(string expression, TDataItem item)
Parameters
System.String
expression
The expression. |
TDataItem
item
The item. |
Returns
System.Object
|
Evaluate(String, IEnumerable<TDataItem>)
Evaluates the specified expression.
Declaration
public object Evaluate(string expression, IEnumerable<TDataItem> items)
Parameters
System.String
expression
The expression. |
System.Collections.Generic.IEnumerable<TDataItem>
items
The items. |
Returns
System.Object
|
Evaluate(String, Int32, Int32)
Evaluates the specified expression.
Declaration
public object Evaluate(string expression, int startIndex, int count)
Parameters
System.String
expression
The expression. |
System.Int32
startIndex
The start index. |
System.Int32
count
The count. |
Returns
System.Object
|
FilterEvaluate(FilterDescriptor, TDataItem)
Declaration
public bool FilterEvaluate(FilterDescriptor filterDescriptor, TDataItem item)
Parameters
FilterDescriptor
filterDescriptor
|
TDataItem
item
|
Returns
System.Boolean
|
Find(Int32, Object)
Finds the specified item index.
Declaration
public virtual TDataItem Find(int itemIndex, object dataBoundItem)
Parameters
System.Int32
itemIndex
Index of the item. |
System.Object
dataBoundItem
The data bound item. |
Returns
TDataItem
|
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.Collections.Generic.IEnumerator<TDataItem>
|
Implements
GetFieldValue(TDataItem, String)
Declaration
protected virtual object GetFieldValue(TDataItem item, string fieldName)
Parameters
TDataItem
item
|
System.String
fieldName
|
Returns
System.Object
|
GetItemPage(TDataItem)
Declaration
public virtual int GetItemPage(TDataItem item)
Parameters
TDataItem
item
|
Returns
System.Int32
|
IndexOf(TDataItem)
Indexes the of.
Declaration
public virtual int IndexOf(TDataItem item)
Parameters
TDataItem
item
The item. |
Returns
System.Int32
|
Implements
InitializeSource(IEnumerable<TDataItem>)
Declaration
protected virtual void InitializeSource(IEnumerable<TDataItem> collection)
Parameters
System.Collections.Generic.IEnumerable<TDataItem>
collection
|
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.Collections.Generic.IEnumerable<TDataItem>
collection
The collection. |
MoveCurrentTo(TDataItem)
Moves the current to.
Declaration
public bool MoveCurrentTo(TDataItem item)
Parameters
TDataItem
item
The item. |
Returns
System.Boolean
|
Implements
MoveCurrentToFirst()
Moves the current to first.
Declaration
public bool MoveCurrentToFirst()
Returns
System.Boolean
|
Implements
MoveCurrentToLast()
Moves the current to last.
Declaration
public bool MoveCurrentToLast()
Returns
System.Boolean
|
Implements
MoveCurrentToNext()
Moves the current to next.
Declaration
public bool MoveCurrentToNext()
Returns
System.Boolean
|
Implements
MoveCurrentToPosition(Int32)
Moves the current to position.
Declaration
public bool MoveCurrentToPosition(int newPosition)
Parameters
System.Int32
newPosition
The position. |
Returns
System.Boolean
|
Implements
MoveCurrentToPrevious()
Moves the current to previous.
Declaration
public bool MoveCurrentToPrevious()
Returns
System.Boolean
|
Implements
MoveToFirstPage()
Sets the first page as the current page.
Declaration
public virtual bool MoveToFirstPage()
Returns
System.Boolean
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.Boolean
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.Boolean
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.Int32
pageIndex
The zero-based index of the page to move to. |
Returns
System.Boolean
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.Boolean
true if the operation was successful; otherwise, false. |
Implements
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Declaration
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters
NotifyCollectionChangedEventArgs
args
|
OnCurrentChanged(EventArgs)
Declaration
protected virtual void OnCurrentChanged(EventArgs args)
Parameters
System.EventArgs
args
|
OnCurrentChanging(CancelEventArgs)
Declaration
protected virtual void OnCurrentChanging(CancelEventArgs args)
Parameters
System.ComponentModel.CancelEventArgs
args
|
OnNotifyPropertyChanged(PropertyChangedEventArgs)
Raises the NotifyPropertyChanged event
Declaration
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters
System.ComponentModel.PropertyChangedEventArgs
e
|
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.Int32
newIndex
The new index. |
Returns
System.Boolean
True if the event was canceled, otherwise false. |
PassesFilter(TDataItem)
Passeses the filter.
Declaration
public virtual bool PassesFilter(TDataItem item)
Parameters
TDataItem
item
The item. |
Returns
System.Boolean
|
ProcessCollectionChanged(NotifyCollectionChangedEventArgs)
Declaration
protected virtual void ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters
NotifyCollectionChangedEventArgs
args
|
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.Int32
newPosition
New position of the current item. |
System.Boolean
forceNotify
True to raise CurrentChanged regardless of whether actual position change is available. |
Returns
System.Boolean
|
SetCurrentPositionCore(Int32, Boolean, CurrentChangeReason)
Declaration
protected bool SetCurrentPositionCore(int newPosition, bool forceNotify, CurrentChangeReason reason)
Parameters
System.Int32
newPosition
|
System.Boolean
forceNotify
|
CurrentChangeReason
reason
|
Returns
System.Boolean
|
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.String
expression
The expression. |
System.Collections.Generic.IEnumerable<TDataItem>
items
The items. |
System.Int32
index
Index of item, which the result will be calculated for |
System.Object
result
Expression result |
Returns
System.Boolean
|
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.String
expression
|
System.Collections.Generic.IEnumerable<TDataItem>
items
|
System.Object
result
|
Returns
System.Boolean
|
VersionUpdateNeeded(NotifyCollectionChangedEventArgs)
Declaration
protected virtual bool VersionUpdateNeeded(NotifyCollectionChangedEventArgs args)
Parameters
NotifyCollectionChangedEventArgs
args
|
Returns
System.Boolean
|
Events
CollectionChanged
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
NotifyCollectionChangedEventHandler
|
Implements
CurrentChanged
Declaration
public event EventHandler CurrentChanged
Event Type
System.EventHandler
|
Implements
CurrentChanging
Declaration
public event CancelEventHandler CurrentChanging
Event Type
System.ComponentModel.CancelEventHandler
|
Implements
PageChanged
Occurs when the IPagedCollectionView.PageIndex has changed.
Declaration
public event EventHandler<EventArgs> PageChanged
Event Type
System.EventHandler<System.EventArgs>
|
Implements
PageChanging
Occurs before the IPagedCollectionView.PageIndex is changed.
Declaration
public event EventHandler<PageChangingEventArgs> PageChanging
Event Type
System.EventHandler<PageChangingEventArgs>
|
Implements
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.ComponentModel.PropertyChangedEventHandler
|
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator
|
Implements
IReadOnlyCollection<TDataItem>.CopyTo(TDataItem[], Int32)
Declaration
void IReadOnlyCollection<TDataItem>.CopyTo(TDataItem[] array, int index)
Parameters
TDataItem[]
array
|
System.Int32
index
|