Class
VirtualQueryableCollectionView

Represents a view for grouping, sorting, filtering and paging data collection virtually.

Definition

Namespace:Telerik.Windows.Data

Assembly:Telerik.Windows.Data.dll

Syntax:

cs-api-definition
public class VirtualQueryableCollectionView : QueryableCollectionView, IEditableCollectionView, IEditableCollectionViewAddNewItem, ICollectionView, INotifyCollectionChanged, INotifyPropertyChanged, IPagedCollectionView, IQueryableCollectionView, IItemProperties, IDisposable, IList, ICollection, IEnumerable

Inheritance: objectQueryableCollectionViewVirtualQueryableCollectionView

Derived Classes: VirtualQueryableCollectionView<T>

Implements: ICollectionICollectionViewIDisposableIEditableCollectionViewIEditableCollectionViewAddNewItemIEnumerableIItemPropertiesIListINotifyCollectionChangedINotifyPropertyChangedIPagedCollectionViewIQueryableCollectionView

Inherited Members QueryableCollectionView.AddNewItem(object)QueryableCollectionView.AddNew(object)QueryableCollectionView.CommitNew()QueryableCollectionView.EditItem(object)QueryableCollectionView.CommitEdit()QueryableCollectionView.CancelEdit()QueryableCollectionView.ConstructNewItem()QueryableCollectionView.RaisePageChanged()QueryableCollectionView.CompletePageMove(int)QueryableCollectionView.MoveToFirstPage()QueryableCollectionView.MoveToLastPage()QueryableCollectionView.MoveToNextPage()QueryableCollectionView.MoveToPage(int)QueryableCollectionView.MoveToPageCore(int)QueryableCollectionView.MoveToPreviousPage()QueryableCollectionView.UpdateItemCount()QueryableCollectionView.GetEffectiveItemCount()QueryableCollectionView.GetPagingDeterminativeItemCount()QueryableCollectionView.InvalidatePagingDeterminativeItemCount()QueryableCollectionView.DeferRefresh()QueryableCollectionView.MoveCurrentTo(object)QueryableCollectionView.MoveCurrentToFirst()QueryableCollectionView.MoveCurrentToLast()QueryableCollectionView.MoveCurrentToNext()QueryableCollectionView.MoveCurrentToPosition(int)QueryableCollectionView.MoveCurrentToPrevious()QueryableCollectionView.OnCurrentChanged(EventArgs)QueryableCollectionView.OnCurrentChanging(CurrentChangingEventArgs)QueryableCollectionView.OnCurrentChanging()QueryableCollectionView.SetCurrentPosition(int)QueryableCollectionView.SetCurrent(object, int)QueryableCollectionView.InitializeCurrentItem()QueryableCollectionView.Contains(object)QueryableCollectionView.Refresh()QueryableCollectionView.OnSortDescriptorsItemChanged(object, ItemChangedEventArgs<ISortDescriptor>)QueryableCollectionView.OnSortDescriptorsCollectionChanged(object, NotifyCollectionChangedEventArgs)QueryableCollectionView.OnGroupDescriptorsItemChanged(object, ItemChangedEventArgs<IGroupDescriptor>)QueryableCollectionView.OnGroupDescriptorsCollectionChanged(object, NotifyCollectionChangedEventArgs)QueryableCollectionView.OnFilterDescriptorsItemChanged(object, ItemChangedEventArgs<IFilterDescriptor>)QueryableCollectionView.OnFilterDescriptorsCollectionChanged(object, NotifyCollectionChangedEventArgs)QueryableCollectionView.OnFilterDescriptorsChanged()QueryableCollectionView.OnFilterDescriptorsLogicalOperatorChanged()QueryableCollectionView.ApplySelectDescriptors(IQueryable)QueryableCollectionView.Sort(IQueryable)QueryableCollectionView.SetInternalList(IList)QueryableCollectionView.GetInternalList()QueryableCollectionView.InitializeInternalList(IQueryable)QueryableCollectionView.CreateInternalList()QueryableCollectionView.PopulateInternalList(IQueryable)QueryableCollectionView.OnInternalListCreated()QueryableCollectionView.OnPropertyChanged(PropertyChangedEventArgs)QueryableCollectionView.RefreshOverrideCore()QueryableCollectionView.RefreshOverride()QueryableCollectionView.InitializeCurrencyOnRefresh(QueryableCollectionView.CurrencyRefreshInfo)QueryableCollectionView.RefreshGroupsOnItemAction(object, ItemAction)QueryableCollectionView.RefreshOnItemAction(object, ItemAction)QueryableCollectionView.RefreshOnItemActionWithoutPaging(object, ItemAction)QueryableCollectionView.OnPropertyChanged(string)QueryableCollectionView.UpdateTotalItemCount()QueryableCollectionView.Dispose()QueryableCollectionView.Dispose(bool)QueryableCollectionView.ShouldRespectIEditableObjectQueryableCollectionView.CanAddNewItemQueryableCollectionView.CurrentAddItemQueryableCollectionView.CanCancelEditQueryableCollectionView.CurrentEditItemQueryableCollectionView.IsAddingNewQueryableCollectionView.IsEditingItemQueryableCollectionView.NewItemPlaceholderPositionQueryableCollectionView.CanChangePageQueryableCollectionView.IsPageChangingQueryableCollectionView.PageIndexQueryableCollectionView.PageSizeQueryableCollectionView.ShouldRefreshOrDeferOnPageSizeChangeQueryableCollectionView.IsPagedQueryableCollectionView.CountQueryableCollectionView.TotalItemCountQueryableCollectionView.CurrentPositionQueryableCollectionView.IsCurrentAfterLastQueryableCollectionView.IsCurrentBeforeFirstQueryableCollectionView.CurrentItemQueryableCollectionView.PendingCurrencyRefreshQueryableCollectionView.NeedsRefreshQueryableCollectionView.SourceCollectionQueryableCollectionView.CanFilterQueryableCollectionView.CanGroupQueryableCollectionView.CanSortQueryableCollectionView.CultureQueryableCollectionView.GroupsQueryableCollectionView.IsEmptyQueryableCollectionView.SortDescriptorsQueryableCollectionView.FilterDescriptorsQueryableCollectionView.GroupDescriptorsQueryableCollectionView.ItemTypeQueryableCollectionView.IsLoadingQueryableCollectionView.IsGroupedQueryableCollectionView.ShouldInitializeGroupProxyQueryableCollectionView.FilterQueryableCollectionView.SortDescriptionsQueryableCollectionView.GroupDescriptionsQueryableCollectionView.ItemPropertiesQueryableCollectionView.ItemPropertiesByPropertyNameQueryableCollectionView.PageChangedQueryableCollectionView.PageChangingQueryableCollectionView.CollectionChangedQueryableCollectionView.CurrentChangedQueryableCollectionView.CurrentChangingQueryableCollectionView.PropertyChangedQueryableCollectionView.GroupCollectionChanged

Constructors

VirtualQueryableCollectionView()

Initializes a new instance of the VirtualQueryableCollectionView class.

Declaration

cs-api-definition
public VirtualQueryableCollectionView()

VirtualQueryableCollectionView(IEnumerable)

Initializes a new instance of the VirtualQueryableCollectionView class.

Declaration

cs-api-definition
public VirtualQueryableCollectionView(IEnumerable source)

Parameters

source

IEnumerable

The source collection.

VirtualQueryableCollectionView(IEnumerable, Type)

Initializes a new instance of the VirtualQueryableCollectionView class.

Declaration

cs-api-definition
public VirtualQueryableCollectionView(IEnumerable source, Type itemType)

Parameters

source

IEnumerable

itemType

Type

Properties

CanAddNew

Gets a value that indicates whether a new item can be added to the collection.

Declaration

cs-api-definition
public override bool CanAddNew { get; }

Property Value

bool

true if SourceCollection is not IsFixedSize or Add method is available and collection element has a default constructor; otherwise, false.

Overrides QueryableCollectionView.CanAddNew

CanRemove

Gets a value that indicates whether an item can be removed from the collection.

Declaration

cs-api-definition
public override bool CanRemove { get; }

Property Value

bool

true if an item can be removed from the collection; otherwise, false.

Overrides QueryableCollectionView.CanRemove

InternalCount

Protected accessor to private count.

Declaration

cs-api-definition
protected override int InternalCount { get; }

Property Value

int

Overrides QueryableCollectionView.InternalCount

InternalList

Gets the list created from resulting query after applying filtering, sorting, grouping and paging.

Declaration

cs-api-definition
protected override IList InternalList { get; }

Property Value

IList

The internal list for the current view.

Overrides QueryableCollectionView.InternalList

IsFixedSize

Declaration

cs-api-definition
public bool IsFixedSize { get; }

Property Value

bool

Implements IList.IsFixedSize

IsReadOnly

Declaration

cs-api-definition
public bool IsReadOnly { get; }

Property Value

bool

Implements IList.IsReadOnly

IsRequestingItems

Gets a value that indicates whether this view is loading items.

Declaration

cs-api-definition
public virtual bool IsRequestingItems { get; protected set; }

Property Value

bool

IsSynchronized

Declaration

cs-api-definition
public bool IsSynchronized { get; }

Property Value

bool

Implements ICollection.IsSynchronized

ItemCount

Gets the minimum number of items known to be in the source collection.

Declaration

cs-api-definition
public override int ItemCount { get; }

Property Value

int

The minimum number of items known to be in the source collection.

Overrides QueryableCollectionView.ItemCount

LoadSize

Gets or sets the total number of items to retrieve.

Declaration

cs-api-definition
public int LoadSize { get; set; }

Property Value

int

The total number of items to retrieve.

QueryableSourceCollection

Returns the queryable collection, constructed from SourceCollection.

Declaration

cs-api-definition
public override IQueryable QueryableSourceCollection { get; }

Property Value

IQueryable

An IQueryable object that is constructed from the underlying collection.

Overrides QueryableCollectionView.QueryableSourceCollection

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

cs-api-definition
public bool ShouldEnumeratorLoadItems { get; set; }

Property Value

bool

SyncRoot

Declaration

cs-api-definition
public object SyncRoot { get; }

Property Value

object

Implements ICollection.SyncRoot

VirtualItemCount

Gets or sets the total number of all items.

Declaration

cs-api-definition
public int VirtualItemCount { get; set; }

Property Value

int

The total number of all items.

Methods

Add(object)

Declaration

cs-api-definition
public int Add(object value)

Parameters

value

object

Returns

int

Implements IList.Add(object)

AddNew()

Adds a new item to the collection.

Declaration

cs-api-definition
public override object AddNew()

Returns

object

The new item that is added to the collection.

Exceptions

InvalidOperationException

CanAddNew is false.

Overrides QueryableCollectionView.AddNew()

CancelNew()

Ends the add transaction and discards the pending new item.

Declaration

cs-api-definition
public override void CancelNew()

Overrides QueryableCollectionView.CancelNew()

Clear()

Declaration

cs-api-definition
public void Clear()

Implements IList.Clear()

CopyTo(Array, int)

Declaration

cs-api-definition
public void CopyTo(Array array, int index)

Parameters

array

Array

index

int

Implements ICollection.CopyTo(Array, int)

CreateView()

Returns IQueryable with applied filtering, sorting, grouping and paging.

Declaration

cs-api-definition
protected override IQueryable CreateView()

Returns

IQueryable

Overrides QueryableCollectionView.CreateView()

GetEnumerator()

Declaration

cs-api-definition
public override IEnumerator GetEnumerator()

Returns

IEnumerator

Overrides QueryableCollectionView.GetEnumerator()

Implements IEnumerable.GetEnumerator()

GetItemAt(int)

Retrieves the item at the specified zero-based index in the view.

Declaration

cs-api-definition
public override object GetItemAt(int index)

Parameters

index

int

The zero-based index of the item to retrieve.

Returns

object

The item at the specified zero-based index in the view.

Exceptions

ArgumentOutOfRangeException

index is less than 0 or greater than ItemCount.

Overrides QueryableCollectionView.GetItemAt(int)

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.

Declaration

cs-api-definition
public override int IndexOf(object item)

Parameters

item

object

The item to locate.

Returns

int

The index at which the specified item is located, or –1 if the item is unknown.

Overrides QueryableCollectionView.IndexOf(object)

Implements IList.IndexOf(object)

Insert(int, object)

Declaration

cs-api-definition
public void Insert(int index, object value)

Parameters

index

int

value

object

Implements IList.Insert(int, object)

InvalidatePagingAndRefresh()

Invalidates the paging and refreshes the view.

Declaration

cs-api-definition
protected override void InvalidatePagingAndRefresh()

Overrides QueryableCollectionView.InvalidatePagingAndRefresh()

Load(int, IEnumerable)

Loads new data in the view.

Declaration

cs-api-definition
public void Load(int startIndex, IEnumerable items)

Parameters

startIndex

int

items

IEnumerable

OnCollectionChanged(NotifyCollectionChangedEventArgs)

Raises the CollectionChanged event.

Declaration

cs-api-definition
protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs args)

Parameters

args

NotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs instance containing the event data.

Overrides QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs)

OnRefresh()

Invoked when the instance should be refreshed.

Declaration

cs-api-definition
protected override void OnRefresh()

Overrides QueryableCollectionView.OnRefresh()

Remove(object)

Removes the specified item from the collection.

Declaration

cs-api-definition
public override void Remove(object item)

Parameters

item

object

The item to remove.

Overrides QueryableCollectionView.Remove(object)

Implements IList.Remove(object)

RemoveAt(int)

Removes the item at the specified position from the collection.

Declaration

cs-api-definition
public override void RemoveAt(int index)

Parameters

index

int

The position of the item to remove.

Overrides QueryableCollectionView.RemoveAt(int)

Implements IList.RemoveAt(int)

ResetItems()

Reset all items to default value (null) in the collection.

Declaration

cs-api-definition
public void ResetItems()

ResetItems(int, int)

Reset number of items starting from given index to default value (null) in the collection.

Declaration

cs-api-definition
public void ResetItems(int startIndex, int count)

Parameters

startIndex

int

count

int

Events

ItemsLoaded

Occurs when the items are loaded.

Declaration

cs-api-definition
public event EventHandler<VirtualQueryableCollectionViewItemsLoadedEventArgs> ItemsLoaded

Event Value

EventHandler<VirtualQueryableCollectionViewItemsLoadedEventArgs>

ItemsLoading

Occurs when the collection is about to load items.

Declaration

cs-api-definition
public event EventHandler<VirtualQueryableCollectionViewItemsLoadingEventArgs> ItemsLoading

Event Value

EventHandler<VirtualQueryableCollectionViewItemsLoadingEventArgs>