ClassVirtualQueryableCollectionView
Represents a view for grouping, sorting, filtering and paging data collection virtually.
Definition
Namespace:Telerik.Windows.Data
Assembly:Telerik.Windows.Data.dll
Syntax:
public class VirtualQueryableCollectionView : QueryableCollectionView, IEditableCollectionView, IEditableCollectionViewAddNewItem, ICollectionView, INotifyCollectionChanged, INotifyPropertyChanged, IPagedCollectionView, IQueryableCollectionView, IItemProperties, IDisposable, IList, ICollection, IEnumerable
Inheritance: objectQueryableCollectionViewVirtualQueryableCollectionView
Derived Classes:
Implements:
Inherited Members
Constructors
VirtualQueryableCollectionView()
Initializes a new instance of the VirtualQueryableCollectionView class.
Declaration
public VirtualQueryableCollectionView()
VirtualQueryableCollectionView(IEnumerable)
Initializes a new instance of the VirtualQueryableCollectionView class.
Declaration
public VirtualQueryableCollectionView(IEnumerable source)
Parameters
source
The source collection.
VirtualQueryableCollectionView(IEnumerable, Type)
Initializes a new instance of the VirtualQueryableCollectionView class.
Declaration
public VirtualQueryableCollectionView(IEnumerable source, Type itemType)
Parameters
source
itemType
Properties
CanAddNew
Gets a value that indicates whether a new item can be added to the collection.
Declaration
public override bool CanAddNew { get; }
Property Value
true if SourceCollection is not IsFixedSize or Add method is available and collection element has a default constructor; otherwise, false.
Overrides
CanRemove
Gets a value that indicates whether an item can be removed from the collection.
Declaration
public override bool CanRemove { get; }
Property Value
true if an item can be removed from the collection; otherwise, false.
Overrides
InternalCount
Protected accessor to private count.
Declaration
protected override int InternalCount { get; }
Property Value
Overrides
InternalList
Gets the list created from resulting query after applying filtering, sorting, grouping and paging.
Declaration
protected override IList InternalList { get; }
Property Value
The internal list for the current view.
Overrides
IsRequestingItems
Gets a value that indicates whether this view is loading items.
Declaration
public virtual bool IsRequestingItems { get; protected set; }
Property Value
ItemCount
Gets the minimum number of items known to be in the source collection.
Declaration
public override int ItemCount { get; }
Property Value
The minimum number of items known to be in the source collection.
Overrides
LoadSize
Gets or sets the total number of items to retrieve.
Declaration
public int LoadSize { get; set; }
Property Value
The total number of items to retrieve.
QueryableSourceCollection
Returns the queryable collection, constructed from SourceCollection.
Declaration
public override IQueryable QueryableSourceCollection { get; }
Property Value
An IQueryable object that is constructed from the underlying collection.
Overrides
ShouldEnumeratorLoadItems
Gets or sets a value that indicates whether items that are not loaded yet should get loaded while the collection's enumerator is traversed.
Declaration
public bool ShouldEnumeratorLoadItems { get; set; }
Property Value
VirtualItemCount
Gets or sets the total number of all items.
Declaration
public int VirtualItemCount { get; set; }
Property Value
The total number of all items.
Methods
AddNew()
Adds a new item to the collection.
Declaration
public override object AddNew()
Returns
The new item that is added to the collection.
Exceptions
CanAddNew is false.
Overrides
CancelNew()
Ends the add transaction and discards the pending new item.
Declaration
public override void CancelNew()
Overrides
Clear()
Declaration
public void Clear()
Implements
CreateView()
Returns IQueryable with applied filtering, sorting, grouping and paging.
Declaration
protected override IQueryable CreateView()
Returns
Overrides
GetEnumerator()
Declaration
public override IEnumerator GetEnumerator()
Returns
Overrides
Implements
GetItemAt(int)
Retrieves the item at the specified zero-based index in the view.
Declaration
public override object GetItemAt(int index)
Parameters
index
The zero-based index of the item to retrieve.
Returns
The item at the specified zero-based index in the view.
Exceptions
index is less than 0 or greater than ItemCount.
Overrides
Remarks
If the item at this index is not loaded will raise ItemsLoading event. The returned item will be null or temporary dynamic item until the real item is loaded.
IndexOf(object)
Returns the zero-based index at which the specified item is located.
InvalidatePagingAndRefresh()
Invalidates the paging and refreshes the view.
Declaration
protected override void InvalidatePagingAndRefresh()
Overrides
Load(int, IEnumerable)
Loads new data in the view.
Declaration
public void Load(int startIndex, IEnumerable items)
Parameters
startIndex
items
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Raises the CollectionChanged event.
Declaration
protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters
args
NotifyCollectionChangedEventArgs
The NotifyCollectionChangedEventArgs instance containing the event data.
Overrides
OnRefresh()
Invoked when the instance should be refreshed.
Declaration
protected override void OnRefresh()
Overrides
Remove(object)
Removes the specified item from the collection.
Declaration
public override void Remove(object item)
Parameters
item
The item to remove.
Overrides
Implements
RemoveAt(int)
Removes the item at the specified position from the collection.
Declaration
public override void RemoveAt(int index)
Parameters
index
The position of the item to remove.
Overrides
Implements
ResetItems()
Reset all items to default value (null) in the collection.
Declaration
public void ResetItems()
ResetItems(int, int)
Reset number of items starting from given index to default value (null) in the collection.
Events
ItemsLoaded
Occurs when the items are loaded.
Declaration
public event EventHandler<VirtualQueryableCollectionViewItemsLoadedEventArgs> ItemsLoaded
Event Value
EventHandler<VirtualQueryableCollectionViewItemsLoadedEventArgs>
ItemsLoading
Occurs when the collection is about to load items.
Declaration
public event EventHandler<VirtualQueryableCollectionViewItemsLoadingEventArgs> ItemsLoading
Event Value
EventHandler<VirtualQueryableCollectionViewItemsLoadingEventArgs>