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