Class VirtualQueryableCollectionView
Represents a view for grouping, sorting, filtering and paging data collection virtually.
Inherited Members
Namespace: Telerik.Windows.Data
Assembly: Telerik.Windows.Data.dll
Syntax
public class VirtualQueryableCollectionView : QueryableCollectionView, IEditableCollectionView, IEditableCollectionViewAddNewItem, ICollectionView, INotifyCollectionChanged, INotifyPropertyChanged, IPagedCollectionView, IWeakEventListener<NotifyCollectionChangedEventArgs>, IWeakEventListener<CurrentChangingEventArgs>, IQueryableCollectionView, IItemProperties, IDisposable, IList, ICollection, IEnumerable
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
System.Collections.IEnumerable
source
The source collection. |
VirtualQueryableCollectionView(IEnumerable, Type)
Initializes a new instance of the VirtualQueryableCollectionView class.
Declaration
public VirtualQueryableCollectionView(IEnumerable source, Type itemType)
Parameters
System.Collections.IEnumerable
source
|
System.Type
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
System.Boolean
true if SourceCollection is not System.Collections.IList.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
System.Boolean
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
System.Int32
|
Overrides
InternalList
Gets the list created from resulting query after applying filtering, sorting, grouping and paging.
Declaration
protected override IList InternalList { get; }
Property Value
System.Collections.IList
The internal list for the current view. |
Overrides
IsFixedSize
Declaration
public bool IsFixedSize { get; }
Property Value
System.Boolean
|
IsReadOnly
Declaration
public bool IsReadOnly { get; }
Property Value
System.Boolean
|
IsRequestingItems
Gets a value that indicates whether this view is loading items.
Declaration
public virtual bool IsRequestingItems { get; protected set; }
Property Value
System.Boolean
|
IsSynchronized
Declaration
public bool IsSynchronized { get; }
Property Value
System.Boolean
|
ItemCount
Gets the minimum number of items known to be in the source collection.
Declaration
public override int ItemCount { get; }
Property Value
System.Int32
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
System.Int32
The total number of items to retrieve. |
QueryableSourceCollection
Returns the queryable collection, constructed from SourceCollection.
Declaration
public override IQueryable QueryableSourceCollection { get; }
Property Value
System.Linq.IQueryable
An System.Linq.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
System.Boolean
|
SyncRoot
Declaration
public object SyncRoot { get; }
Property Value
System.Object
|
VirtualItemCount
Gets or sets the total number of all items.
Declaration
public int VirtualItemCount { get; set; }
Property Value
System.Int32
The total number of all items. |
Methods
Add(Object)
Declaration
public int Add(object value)
Parameters
System.Object
value
|
Returns
System.Int32
|
AddNew()
Adds a new item to the collection.
Declaration
public override object AddNew()
Returns
System.Object
The new item that is added to the collection. |
Overrides
Exceptions
System.InvalidOperationException
CanAddNew is false. |
CancelNew()
Ends the add transaction and discards the pending new item.
Declaration
public override void CancelNew()
Overrides
Clear()
Declaration
public void Clear()
CopyTo(Array, Int32)
Declaration
public void CopyTo(Array array, int index)
Parameters
System.Array
array
|
System.Int32
index
|
CreateView()
Returns System.Linq.IQueryable with applied filtering, sorting, grouping and paging.
Declaration
protected override IQueryable CreateView()
Returns
System.Linq.IQueryable
|
Overrides
GetEnumerator()
Declaration
public override IEnumerator GetEnumerator()
Returns
System.Collections.IEnumerator
|
Overrides
GetItemAt(Int32)
Retrieves the item at the specified zero-based index in the view.
Declaration
public override object GetItemAt(int index)
Parameters
System.Int32
index
The zero-based index of the item to retrieve. |
Returns
System.Object
The item at the specified zero-based index in the view. |
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.
Exceptions
System.ArgumentOutOfRangeException
|
IndexOf(Object)
Returns the zero-based index at which the specified item is located.
Declaration
public override int IndexOf(object item)
Parameters
System.Object
item
The item to locate. |
Returns
System.Int32
The index at which the specified item is located, or –1 if the item is unknown. |
Overrides
Insert(Int32, Object)
Declaration
public void Insert(int index, object value)
Parameters
System.Int32
index
|
System.Object
value
|
InvalidatePagingAndRefresh()
Invalidates the paging and refreshes the view.
Declaration
protected override void InvalidatePagingAndRefresh()
Overrides
Load(Int32, IEnumerable)
Loads new data in the view.
Declaration
public void Load(int startIndex, IEnumerable items)
Parameters
System.Int32
startIndex
|
System.Collections.IEnumerable
items
|
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Raises the CollectionChanged event.
Declaration
protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters
System.Collections.Specialized.NotifyCollectionChangedEventArgs
args
The System.Collections.Specialized.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
System.Object
item
The item to remove. |
Overrides
RemoveAt(Int32)
Removes the item at the specified position from the collection.
Declaration
public override void RemoveAt(int index)
Parameters
System.Int32
index
The position of the item to remove. |
Overrides
ResetItems()
Reset all items to default value (null) in the collection.
Declaration
public void ResetItems()
ResetItems(Int32, Int32)
Reset number of items starting from given index to default value (null) in the collection.
Declaration
public void ResetItems(int startIndex, int count)
Parameters
System.Int32
startIndex
|
System.Int32
count
|
Events
ItemsLoaded
Occurs when the items are loaded.
Declaration
public event EventHandler<VirtualQueryableCollectionViewItemsLoadedEventArgs> ItemsLoaded
Event Type
System.EventHandler<VirtualQueryableCollectionViewItemsLoadedEventArgs>
|
ItemsLoading
Occurs when the collection is about to load items.
Declaration
public event EventHandler<VirtualQueryableCollectionViewItemsLoadingEventArgs> ItemsLoading
Event Type
System.EventHandler<VirtualQueryableCollectionViewItemsLoadingEventArgs>
|