Class
QueryableCollectionView

Represents a view for grouping, sorting, filtering and paging data collection using LINQ based query operators.

Definition

Namespace:Telerik.Windows.Data

Assembly:Telerik.Windows.Data.dll

Syntax:

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

Inheritance: objectQueryableCollectionView

Derived Classes: QueryableDataServiceCollectionViewBaseHierarchicalDataCollectionViewHierarchicalCollectionViewBaseQueryableEntityCoreCollectionView<T>VirtualQueryableCollectionView

Implements: ICollectionViewIDisposableIEditableCollectionViewIEditableCollectionViewAddNewItemIEnumerableIItemPropertiesINotifyCollectionChangedINotifyPropertyChangedIPagedCollectionViewIQueryableCollectionView

Constructors

QueryableCollectionView(IEnumerable)

Initializes a new instance of the QueryableCollectionView class.

Declaration

cs-api-definition
public QueryableCollectionView(IEnumerable source)

Parameters

source

IEnumerable

The source collection.

QueryableCollectionView(IEnumerable, Type)

Initializes a new instance of the QueryableCollectionView class.

Declaration

cs-api-definition
public QueryableCollectionView(IEnumerable sourceCollection, Type itemType)

Parameters

sourceCollection

IEnumerable

The source collection.

itemType

Type

Type which will be used for all operations.

Exceptions

ArgumentNullException

sourceCollection is null.

Properties

CanAddNew

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

Declaration

cs-api-definition
public virtual 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.

CanAddNewItem

Gets a value that indicates whether a specified object can be added to the collection.

Declaration

cs-api-definition
public virtual bool CanAddNewItem { get; }

Property Value

bool

true if a specified object can be added to the collection; otherwise false.

CanCancelEdit

Gets a value that indicates whether the editing of an item can be canceled.

Declaration

cs-api-definition
public virtual bool CanCancelEdit { get; }

Property Value

bool

true if CurrentEditItem implements IEditableObject; otherwise, false.

CanChangePage

Gets a value that indicates whether the PageIndex value can change.

Declaration

cs-api-definition
public virtual bool CanChangePage { get; }

Property Value

bool

true if the PageIndex value can change; otherwise, false.

Implements IPagedCollectionView.CanChangePage

CanFilter

Gets a value that indicates whether this view supports filtering via the FilterDescriptors property.

Declaration

cs-api-definition
public virtual bool CanFilter { get; }

Property Value

bool

For a default instance of QueryableCollectionView, this property always returns true.

CanGroup

Gets a value that indicates whether this view supports grouping via the GroupDescriptors property.

Declaration

cs-api-definition
public virtual bool CanGroup { get; }

Property Value

bool

For a default instance of QueryableCollectionView, this property always returns true.

CanRemove

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

Declaration

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

Property Value

bool

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

CanSort

Gets a value that indicates whether this view supports sorting via the SortDescriptors property.

Declaration

cs-api-definition
public virtual bool CanSort { get; }

Property Value

bool

For a default instance of QueryableCollectionView, this property always returns true.

Count

Gets the number of records in the view after grouping, filtering, sorting, and paging.

Declaration

cs-api-definition
public int Count { get; }

Property Value

int

The number of records in the view after grouping, filtering, sorting, and paging.

Culture

Gets or sets the cultural info for any operations of the view that may differ by culture, such as sorting.

Declaration

cs-api-definition
public virtual CultureInfo Culture { get; set; }

Property Value

CultureInfo

The culture to use during sorting.

CurrentAddItem

Gets the item that is being added during the current add transaction.

Declaration

cs-api-definition
public virtual object CurrentAddItem { get; }

Property Value

object

The item that is being added if IsAddingNew is true; otherwise, null.

CurrentEditItem

Gets the item in the collection that is being edited.

Declaration

cs-api-definition
public virtual object CurrentEditItem { get; }

Property Value

object

The item in the collection that is being edited if IsEditingItem is true; otherwise, null.

CurrentItem

Declaration

cs-api-definition
public virtual object CurrentItem { get; }

Property Value

object

CurrentPosition

Declaration

cs-api-definition
public virtual int CurrentPosition { get; }

Property Value

int

Filter

Gets or sets a callback used to determine if an item is suitable for inclusion in the view.

Declaration

cs-api-definition
public virtual Predicate<object> Filter { get; set; }

Property Value

Predicate<object>

A method used to determine if an item is suitable for inclusion in the view.

Exceptions

NotSupportedException

Setting Filter property is not supported. Use FilterDescriptors property instead.

FilterDescriptors

Gets the filter descriptors used for filtering operations.

Declaration

cs-api-definition
public virtual CompositeFilterDescriptorCollection FilterDescriptors { get; }

Property Value

CompositeFilterDescriptorCollection

The filter descriptors.

Implements IQueryableCollectionView.FilterDescriptors

GroupDescriptions

Gets the underlying collection.

Declaration

cs-api-definition
protected ObservableCollection<GroupDescription> GroupDescriptions { get; }

Property Value

ObservableCollection<GroupDescription>

The for this view.

GroupDescriptors

Gets the group descriptors used for grouping operations.

Declaration

cs-api-definition
public virtual GroupDescriptorCollection GroupDescriptors { get; }

Property Value

GroupDescriptorCollection

The group descriptors.

Implements IQueryableCollectionView.GroupDescriptors

Groups

Gets the top-level groups.

Declaration

cs-api-definition
public ReadOnlyObservableCollection<object> Groups { get; }

Property Value

ReadOnlyObservableCollection<object>

A read-only collection of the top-level groups or null if there are no groups.

InternalCount

Protected accessor to private count.

Declaration

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

Property Value

int

InternalList

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

Declaration

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

Property Value

IList

The internal list for the current view.

IsAddingNew

Gets a value that indicates whether an add transaction is in progress.

Declaration

cs-api-definition
public virtual bool IsAddingNew { get; }

Property Value

bool

true if an add transaction is in progress; otherwise, false.

IsCurrentAfterLast

Declaration

cs-api-definition
public virtual bool IsCurrentAfterLast { get; }

Property Value

bool

IsCurrentBeforeFirst

Declaration

cs-api-definition
public virtual bool IsCurrentBeforeFirst { get; }

Property Value

bool

IsEditingItem

Gets a value that indicates whether an edit transaction is in progress.

Declaration

cs-api-definition
public virtual bool IsEditingItem { get; }

Property Value

bool

true if an edit transaction is in progress; otherwise, false.

IsEmpty

Returns a value that indicates whether the resulting view is empty.

Declaration

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

Property Value

bool

true if the resulting view is empty; otherwise, false.

IsGrouped

Gets a value indicating whether this instance is grouped.

Declaration

cs-api-definition
public virtual bool IsGrouped { get; }

Property Value

bool

true if this instance is grouped; otherwise, false.

IsLoading

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

Declaration

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

Property Value

bool

IsPageChanging

Gets a value that indicates whether a page index change is in process.

Declaration

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

Property Value

bool

true if the page index is changing; otherwise, false.

Implements IPagedCollectionView.IsPageChanging

IsPaged

Gets a value indicating whether this instance has pages or not.

Declaration

cs-api-definition
protected virtual bool IsPaged { get; }

Property Value

bool

true if this instance has PageSize greater than 0; otherwise, false.

ItemCount

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

Declaration

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

Property Value

int

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

Implements IPagedCollectionView.ItemCount

ItemProperties

Gets a collection of objects that describes the properties of the items in the collection.

Declaration

cs-api-definition
public ReadOnlyCollection<ItemPropertyInfo> ItemProperties { get; }

Property Value

ReadOnlyCollection<ItemPropertyInfo>

A collection of objects that describes the properties of the items in the collection.

ItemPropertiesByPropertyName

Gets a dictionary of objects that describes the properties of the items in the collection by property name.

Declaration

cs-api-definition
public Dictionary<string, ItemPropertyInfo> ItemPropertiesByPropertyName { get; }

Property Value

Dictionary<string, ItemPropertyInfo>

A dictionary of objects that describes the properties of the items in the collection by property name.

ItemType

Gets or sets the type used for all internal data engine operations.

Declaration

cs-api-definition
public Type ItemType { get; set; }

Property Value

Type

The type of the item.

NeedsRefresh

Gets a value that indicates whether this view needs to be refreshed.

Declaration

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

Property Value

bool

true if the view needs to be refreshed; otherwise, false.

NewItemPlaceholderPosition

Gets or sets the position of the new item placeholder in the collection.

Declaration

cs-api-definition
public virtual NewItemPlaceholderPosition NewItemPlaceholderPosition { get; set; }

Property Value

NewItemPlaceholderPosition

One of the enumeration values that specifies the position of the new item placeholder in the collection.

PageIndex

Gets the zero-based index of the current page.

Declaration

cs-api-definition
public int PageIndex { get; protected set; }

Property Value

int

The zero-based index of the current page.

Implements IPagedCollectionView.PageIndex

PageSize

Gets or sets the number of items to display on a page.

Declaration

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

Property Value

int

The number of items to display on a page.

Implements IPagedCollectionView.PageSize

PendingCurrencyRefresh

Used to hold "old" currency info when DataLoadMode is Asynchronous and we need to refresh the currency after the load is complete. This field is not supposed to be used directly from your code.

Declaration

cs-api-definition
protected QueryableCollectionView.CurrencyRefreshInfo PendingCurrencyRefresh { get; set; }

Property Value

QueryableCollectionView.CurrencyRefreshInfo

QueryableSourceCollection

Returns the queryable collection, constructed from SourceCollection.

Declaration

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

Property Value

IQueryable

An IQueryable object that is constructed from the underlying collection.

ShouldInitializeGroupProxy

Gets a value indicating whether should initialize group proxy.

Declaration

cs-api-definition
protected virtual bool ShouldInitializeGroupProxy { get; }

Property Value

bool

true if should initialize group proxy; otherwise, false.

ShouldRefreshOrDeferOnPageSizeChange

Gets a value indicating whether this instance should RefreshOrDefer when PageSize changes.

Declaration

cs-api-definition
protected virtual bool ShouldRefreshOrDeferOnPageSizeChange { get; }

Property Value

bool

true if this instance should RefreshOrDefer when PageSize changes; otherwise, false.

ShouldRespectIEditableObject

Gets or set a value that indicates whether IEditableObject methods are automatically invoked by QueryableCollectionView.

Declaration

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

Property Value

bool

SortDescriptions

Gets the underlying collection.

Declaration

cs-api-definition
protected SortDescriptionCollection SortDescriptions { get; }

Property Value

SortDescriptionCollection

The for this view.

SortDescriptors

Gets the sort descriptors used for sorting operations.

Declaration

cs-api-definition
public virtual SortDescriptorCollection SortDescriptors { get; }

Property Value

SortDescriptorCollection

The sort descriptors.

Implements IQueryableCollectionView.SortDescriptors

SourceCollection

Returns the underlying collection.

Declaration

cs-api-definition
public IEnumerable SourceCollection { get; }

Property Value

IEnumerable

An IEnumerable object that is the underlying collection.

TotalItemCount

Gets the total number of items in the source collection, or -1 if the total number is unknown.

Declaration

cs-api-definition
public virtual int TotalItemCount { get; protected set; }

Property Value

int

The total number of items in the source collection, or -1 if the total number is unknown.

Implements IPagedCollectionView.TotalItemCount

Methods

AddNew()

Adds a new item to the collection.

Declaration

cs-api-definition
public virtual object AddNew()

Returns

object

The new item that is added to the collection.

Exceptions

InvalidOperationException

CanAddNew is false.

AddNew(object)

Adds the new item to the collection.

Declaration

cs-api-definition
public void AddNew(object newItem)

Parameters

newItem

object

The new item that will be added to the collection.

Exceptions

InvalidOperationException

CanAddNew is false.

AddNewItem(object)

Adds the specified object to the collection.

Declaration

cs-api-definition
public virtual object AddNewItem(object newItem)

Parameters

newItem

object

The object to add to the collection.

Returns

object

ApplySelectDescriptors(IQueryable)

Applies SelectDescriptors over the specified queryable.

Declaration

cs-api-definition
protected virtual IQueryable ApplySelectDescriptors(IQueryable queryable)

Parameters

queryable

IQueryable

The queryable.

Returns

IQueryable

CancelEdit()

Ends the edit transaction and discards any pending changes to the item.

Declaration

cs-api-definition
public virtual void CancelEdit()

Exceptions

InvalidOperationException

CancelEdit is not supported for the current edit item. Only items implementing IEditableObject are supported.

CancelNew()

Ends the add transaction and discards the pending new item.

Declaration

cs-api-definition
public virtual void CancelNew()

CommitEdit()

Ends the edit transaction and saves the pending changes.

Declaration

cs-api-definition
public virtual void CommitEdit()

CommitNew()

Ends the add transaction and saves the pending new item.

Declaration

cs-api-definition
public virtual void CommitNew()

CompletePageMove(int)

Completes the page move.

Declaration

cs-api-definition
protected virtual void CompletePageMove(int newPageIndex)

Parameters

newPageIndex

int

The index of the new page.

ConstructNewItem()

Constructs a new item.

Declaration

cs-api-definition
protected virtual object ConstructNewItem()

Returns

object

Contains(object)

Returns a value that indicates whether a given item belongs to this collection view.

Declaration

cs-api-definition
public bool Contains(object item)

Parameters

item

object

The object to check.

Returns

bool

True if the item belongs to this collection view; otherwise, false.

CreateInternalList()

Called when internal list needs to be created.

Declaration

cs-api-definition
protected virtual void CreateInternalList()

CreateView()

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

Declaration

cs-api-definition
protected virtual IQueryable CreateView()

Returns

IQueryable

DeferRefresh()

Enters a defer cycle that you can use to merge changes to the view and delay automatic refresh.

Declaration

cs-api-definition
public IDisposable DeferRefresh()

Returns

IDisposable

An IDisposable object that you can use to dispose of the calling object.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration

cs-api-definition
public void Dispose()

Implements IDisposable.Dispose()

Dispose(bool)

Unsubscribes form collection changed events.

Declaration

cs-api-definition
protected virtual void Dispose(bool disposing)

Parameters

disposing

bool

EditItem(object)

Begins an edit transaction of the specified item.

Declaration

cs-api-definition
public virtual void EditItem(object item)

Parameters

item

object

The item to edit.

GetEffectiveItemCount()

Gets the count of items depending on the page and/or grouped state.

Declaration

cs-api-definition
protected virtual int GetEffectiveItemCount()

Returns

int

The count of items.

GetEnumerator()

Declaration

cs-api-definition
public virtual IEnumerator GetEnumerator()

Returns

IEnumerator

Implements IEnumerable.GetEnumerator()

GetInternalList()

Called when internal list is required.

Declaration

cs-api-definition
protected IList GetInternalList()

Returns

IList

GetItemAt(int)

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

Declaration

cs-api-definition
public virtual 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.

GetPagingDeterminativeItemCount()

Gets the paging determinative item count.

Declaration

cs-api-definition
protected virtual int GetPagingDeterminativeItemCount()

Returns

int

The paging determinative item count.

IndexOf(object)

Returns the zero-based index at which the specified item is located.

Declaration

cs-api-definition
public virtual 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.

InitializeCurrencyOnRefresh(CurrencyRefreshInfo)

Initializes the currency on refresh.

Declaration

cs-api-definition
protected void InitializeCurrencyOnRefresh(QueryableCollectionView.CurrencyRefreshInfo currencyRefreshInfo)

Parameters

currencyRefreshInfo

QueryableCollectionView.CurrencyRefreshInfo

The currency refresh info.

InitializeCurrentItem()

Called when the current item should be initialized.

Declaration

cs-api-definition
protected void InitializeCurrentItem()

InitializeInternalList(IQueryable)

Called when internal list should be initialized.

Declaration

cs-api-definition
protected virtual void InitializeInternalList(IQueryable view)

Parameters

view

IQueryable

InvalidatePagingAndRefresh()

Invalidates the paging and refreshes the view.

Declaration

cs-api-definition
protected virtual void InvalidatePagingAndRefresh()

InvalidatePagingDeterminativeItemCount()

Invalidates the paging determinative item count.

Declaration

cs-api-definition
protected virtual void InvalidatePagingDeterminativeItemCount()

MoveCurrentTo(object)

Declaration

cs-api-definition
public bool MoveCurrentTo(object item)

Parameters

item

object

Returns

bool

MoveCurrentToFirst()

Declaration

cs-api-definition
public bool MoveCurrentToFirst()

Returns

bool

MoveCurrentToLast()

Declaration

cs-api-definition
public bool MoveCurrentToLast()

Returns

bool

MoveCurrentToNext()

Declaration

cs-api-definition
public bool MoveCurrentToNext()

Returns

bool

MoveCurrentToPosition(int)

Sets the item at the specified index to be the CurrentItem in the view.

Declaration

cs-api-definition
public bool MoveCurrentToPosition(int position)

Parameters

position

int

The index to set the CurrentItem to.

Returns

bool

True if the resulting CurrentItem is an item within the view; otherwise, false.

Exceptions

ArgumentOutOfRangeException

position is out of range.

MoveCurrentToPrevious()

Declaration

cs-api-definition
public bool MoveCurrentToPrevious()

Returns

bool

MoveToFirstPage()

Sets the first page as the current page.

Declaration

cs-api-definition
public bool MoveToFirstPage()

Returns

bool

true if the operation was successful; otherwise, false.

Implements IPagedCollectionView.MoveToFirstPage()

MoveToLastPage()

Sets the last page as the current page.

Declaration

cs-api-definition
public bool MoveToLastPage()

Returns

bool

true if the operation was successful; otherwise, false.

Implements IPagedCollectionView.MoveToLastPage()

MoveToNextPage()

Moves to the page after the current page.

Declaration

cs-api-definition
public bool MoveToNextPage()

Returns

bool

true if the operation was successful; otherwise, false.

Implements IPagedCollectionView.MoveToNextPage()

MoveToPage(int)

Requests a page move to the page at the specified index.

Declaration

cs-api-definition
public bool MoveToPage(int pageIndex)

Parameters

pageIndex

int

The index of the page to move to.

Returns

bool

true if the move was successfully initiated; otherwise, false.

Implements IPagedCollectionView.MoveToPage(int)

MoveToPageCore(int)

Requests a page move to the page at the specified index.

Declaration

cs-api-definition
protected virtual bool MoveToPageCore(int index)

Parameters

index

int

The index of the page to move to.

Returns

bool

true if the move was successfully initiated; otherwise, false.

MoveToPreviousPage()

Moves to the page before the current page.

Declaration

cs-api-definition
public bool MoveToPreviousPage()

Returns

bool

true if the operation was successful; otherwise, false.

Implements IPagedCollectionView.MoveToPreviousPage()

OnCollectionChanged(NotifyCollectionChangedEventArgs)

Raises the CollectionChanged event.

Declaration

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

Parameters

args

NotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs instance containing the event data.

OnCurrentChanged(EventArgs)

Raises the CurrentChanged event.

Declaration

cs-api-definition
protected virtual void OnCurrentChanged(EventArgs args)

Parameters

args

EventArgs

The EventArgs instance containing the event data.

OnCurrentChanging()

Raise a non-cancelable CurrentChanging event This is called when CurrentItem is affected by a CollectionChange (Remove or Refresh).

Declaration

cs-api-definition
protected void OnCurrentChanging()

OnCurrentChanging(CurrentChangingEventArgs)

Raises the CurrentChanging event.

Declaration

cs-api-definition
protected virtual void OnCurrentChanging(CurrentChangingEventArgs args)

Parameters

args

CurrentChangingEventArgs

The CurrentChangingEventArgs instance containing the event data.

OnFilterDescriptorsChanged()

Called when anything in the filter descriptors changes.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
protected virtual void OnFilterDescriptorsChanged()

OnFilterDescriptorsCollectionChanged(object, NotifyCollectionChangedEventArgs)

Invoked when the FilterDescriptors collection changes.

Declaration

cs-api-definition
protected virtual void OnFilterDescriptorsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)

Parameters

sender

object

Current instance of the QueryableCollectionView collection.

e

NotifyCollectionChangedEventArgs

Information about the change.

OnFilterDescriptorsItemChanged(object, ItemChangedEventArgs<IFilterDescriptor>)

Invoked when the FilterDescriptors item changes.

Declaration

cs-api-definition
protected virtual void OnFilterDescriptorsItemChanged(object sender, ItemChangedEventArgs<IFilterDescriptor> e)

Parameters

sender

object

Current instance of the QueryableCollectionView collection.

e

ItemChangedEventArgs<IFilterDescriptor>

Information about the change.

OnFilterDescriptorsLogicalOperatorChanged()

Invoked when the FilterDescriptors logical operator changes.

Declaration

cs-api-definition
protected virtual void OnFilterDescriptorsLogicalOperatorChanged()

OnGroupDescriptorsCollectionChanged(object, NotifyCollectionChangedEventArgs)

Invoked when the collection changes.

Declaration

cs-api-definition
protected virtual void OnGroupDescriptorsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)

Parameters

sender

object

Current instance of the QueryableCollectionView collection.

e

NotifyCollectionChangedEventArgs

Information about the change.

OnGroupDescriptorsItemChanged(object, ItemChangedEventArgs<IGroupDescriptor>)

Invoked when the GroupDescriptors item changes.

Declaration

cs-api-definition
protected virtual void OnGroupDescriptorsItemChanged(object sender, ItemChangedEventArgs<IGroupDescriptor> e)

Parameters

sender

object

Current instance of the QueryableCollectionView collection.

e

ItemChangedEventArgs<IGroupDescriptor>

Information about the change.

OnInternalListCreated()

Called when internal list is created.

Declaration

cs-api-definition
protected void OnInternalListCreated()

OnPropertyChanged(PropertyChangedEventArgs)

Raises the PropertyChanged event.

Declaration

cs-api-definition
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)

Parameters

e

PropertyChangedEventArgs

The PropertyChangedEventArgs instance containing the event data.

OnPropertyChanged(string)

Raises the PropertyChanged event.

Declaration

cs-api-definition
protected void OnPropertyChanged(string propertyName)

Parameters

propertyName

string

Name of the property.

OnRefresh()

Invoked when the instance should be refreshed.

Declaration

cs-api-definition
protected virtual void OnRefresh()

OnSortDescriptorsCollectionChanged(object, NotifyCollectionChangedEventArgs)

Invoked when the SortDescriptors collection changes.

Declaration

cs-api-definition
protected virtual void OnSortDescriptorsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)

Parameters

sender

object

Current instance of the QueryableCollectionView collection.

e

NotifyCollectionChangedEventArgs

Information about the change.

OnSortDescriptorsItemChanged(object, ItemChangedEventArgs<ISortDescriptor>)

Invoked when the SortDescriptors item changes.

Declaration

cs-api-definition
protected virtual void OnSortDescriptorsItemChanged(object sender, ItemChangedEventArgs<ISortDescriptor> e)

Parameters

sender

object

Current instance of the QueryableCollectionView collection.

e

ItemChangedEventArgs<ISortDescriptor>

Information about the change.

PopulateInternalList(IQueryable)

Called when internal list should be populated.

Declaration

cs-api-definition
protected virtual void PopulateInternalList(IQueryable view)

Parameters

view

IQueryable

RaisePageChanged()

Raises the PageChanged event.

Declaration

cs-api-definition
protected void RaisePageChanged()

Refresh()

Declaration

cs-api-definition
public void Refresh()

RefreshGroupsOnItemAction(object, ItemAction)

Refreshes the groups according to the item and the respective action.

Declaration

cs-api-definition
protected void RefreshGroupsOnItemAction(object item, ItemAction action)

Parameters

item

object

The item.

action

ItemAction

The action.

RefreshOnItemAction(object, ItemAction)

Refreshes the view according to the item and the respective action.

Declaration

cs-api-definition
protected virtual void RefreshOnItemAction(object item, ItemAction action)

Parameters

item

object

The item.

action

ItemAction

The action.

RefreshOnItemActionWithoutPaging(object, ItemAction)

Refreshes the view according to the item and the respective action when there is no paging involved.

Declaration

cs-api-definition
protected void RefreshOnItemActionWithoutPaging(object item, ItemAction action)

Parameters

item

object

The item.

action

ItemAction

The action.

RefreshOverride()

Re-create the view over the associated IList.

Declaration

cs-api-definition
protected virtual void RefreshOverride()

RefreshOverrideCore()

Re-create the view over the associated IList.

Declaration

cs-api-definition
protected void RefreshOverrideCore()

Remove(object)

Removes the specified item from the collection.

Declaration

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

Parameters

item

object

The item to remove.

RemoveAt(int)

Removes the item at the specified position from the collection.

Declaration

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

Parameters

index

int

The position of the item to remove.

SetCurrent(object, int)

Sets the CurrentItem and CurrentPosition.

Declaration

cs-api-definition
protected void SetCurrent(object newItem, int newPosition)

Parameters

newItem

object

The new current item.

newPosition

int

The new current position.

SetCurrentPosition(int)

Sets the CurrentPosition to the given newPosition .

Declaration

cs-api-definition
protected void SetCurrentPosition(int newPosition)

Parameters

newPosition

int

The new position.

SetInternalList(IList)

Called when internal list should be set.

Declaration

cs-api-definition
protected void SetInternalList(IList list)

Parameters

list

IList

Sort(IQueryable)

Sorts the specified queryable.

Declaration

cs-api-definition
protected IQueryable Sort(IQueryable queryable)

Parameters

queryable

IQueryable

Returns

IQueryable

UpdateItemCount()

Called when the count of the items should be updated.

Declaration

cs-api-definition
protected void UpdateItemCount()

UpdateTotalItemCount()

Called when the count of all items should be updated.

Declaration

cs-api-definition
protected virtual void UpdateTotalItemCount()

Events

CollectionChanged

Declaration

cs-api-definition
public event NotifyCollectionChangedEventHandler CollectionChanged

Event Value

NotifyCollectionChangedEventHandler

Implements INotifyCollectionChanged.CollectionChanged

CurrentChanged

Declaration

cs-api-definition
public event EventHandler CurrentChanged

Event Value

EventHandler

CurrentChanging

Declaration

cs-api-definition
public event CurrentChangingEventHandler CurrentChanging

Event Value

CurrentChangingEventHandler

GroupCollectionChanged

This is for internal use only and is not intended to be used directly from your code.

Declaration

cs-api-definition
public event EventHandler<NotifyGroupCollectionChangedEventArgs> GroupCollectionChanged

Event Value

EventHandler<NotifyGroupCollectionChangedEventArgs>

PageChanged

Occurs when the PageIndex has changed.

Declaration

cs-api-definition
public event EventHandler<EventArgs> PageChanged

Event Value

EventHandler<EventArgs>

Implements IPagedCollectionView.PageChanged

PageChanging

Occurs when the PageIndex is changing.

Declaration

cs-api-definition
public event EventHandler<PageChangingEventArgs> PageChanging

Event Value

EventHandler<PageChangingEventArgs>

Implements IPagedCollectionView.PageChanging

PropertyChanged

Declaration

cs-api-definition
public event PropertyChangedEventHandler PropertyChanged

Event Value

PropertyChangedEventHandler

Implements INotifyPropertyChanged.PropertyChanged

In this article
DefinitionConstructorsQueryableCollectionView(IEnumerable)QueryableCollectionView(IEnumerable, Type)PropertiesCanAddNewCanAddNewItemCanCancelEditCanChangePageCanFilterCanGroupCanRemoveCanSortCountCultureCurrentAddItemCurrentEditItemCurrentItemCurrentPositionFilterFilterDescriptorsGroupDescriptionsGroupDescriptorsGroupsInternalCountInternalListIsAddingNewIsCurrentAfterLastIsCurrentBeforeFirstIsEditingItemIsEmptyIsGroupedIsLoadingIsPageChangingIsPagedItemCountItemPropertiesItemPropertiesByPropertyNameItemTypeNeedsRefreshNewItemPlaceholderPositionPageIndexPageSizePendingCurrencyRefreshQueryableSourceCollectionShouldInitializeGroupProxyShouldRefreshOrDeferOnPageSizeChangeShouldRespectIEditableObjectSortDescriptionsSortDescriptorsSourceCollectionTotalItemCountMethodsAddNew()AddNew(object)AddNewItem(object)ApplySelectDescriptors(IQueryable)CancelEdit()CancelNew()CommitEdit()CommitNew()CompletePageMove(int)ConstructNewItem()Contains(object)CreateInternalList()CreateView()DeferRefresh()Dispose()Dispose(bool)EditItem(object)GetEffectiveItemCount()GetEnumerator()GetInternalList()GetItemAt(int)GetPagingDeterminativeItemCount()IndexOf(object)InitializeCurrencyOnRefresh(CurrencyRefreshInfo)InitializeCurrentItem()InitializeInternalList(IQueryable)InvalidatePagingAndRefresh()InvalidatePagingDeterminativeItemCount()MoveCurrentTo(object)MoveCurrentToFirst()MoveCurrentToLast()MoveCurrentToNext()MoveCurrentToPosition(int)MoveCurrentToPrevious()MoveToFirstPage()MoveToLastPage()MoveToNextPage()MoveToPage(int)MoveToPageCore(int)MoveToPreviousPage()OnCollectionChanged(NotifyCollectionChangedEventArgs)OnCurrentChanged(EventArgs)OnCurrentChanging()OnCurrentChanging(CurrentChangingEventArgs)OnFilterDescriptorsChanged()OnFilterDescriptorsCollectionChanged(object, NotifyCollectionChangedEventArgs)OnFilterDescriptorsItemChanged(object, ItemChangedEventArgs<IFilterDescriptor>)OnFilterDescriptorsLogicalOperatorChanged()OnGroupDescriptorsCollectionChanged(object, NotifyCollectionChangedEventArgs)OnGroupDescriptorsItemChanged(object, ItemChangedEventArgs<IGroupDescriptor>)OnInternalListCreated()OnPropertyChanged(PropertyChangedEventArgs)OnPropertyChanged(string)OnRefresh()OnSortDescriptorsCollectionChanged(object, NotifyCollectionChangedEventArgs)OnSortDescriptorsItemChanged(object, ItemChangedEventArgs<ISortDescriptor>)PopulateInternalList(IQueryable)RaisePageChanged()Refresh()RefreshGroupsOnItemAction(object, ItemAction)RefreshOnItemAction(object, ItemAction)RefreshOnItemActionWithoutPaging(object, ItemAction)RefreshOverride()RefreshOverrideCore()Remove(object)RemoveAt(int)SetCurrent(object, int)SetCurrentPosition(int)SetInternalList(IList)Sort(IQueryable)UpdateItemCount()UpdateTotalItemCount()EventsCollectionChangedCurrentChangedCurrentChangingGroupCollectionChangedPageChangedPageChangingPropertyChanged
Not finding the help you need?
Contact Support