DataItemCollection
DataItemCollection.
Definition
Namespace:Telerik.Windows.Data
Assembly:Telerik.Windows.Data.dll
Syntax:
public class DataItemCollection : IList, ICollection, IEnumerable, IQueryableCollectionView, IItemProperties, IEditableCollectionView, IEditableCollectionViewAddNewItem, ICollectionView, INotifyCollectionChanged, INotifyPropertyChanged, IPagedCollectionView
Inheritance: objectDataItemCollection
Implements:
Properties
Gets a value that indicates whether a new item can be added to the collection.
public bool CanAddNew { get; }
true if SourceCollection is not IsFixedSize and collection element has a default constructor; otherwise, false.
Gets a value that indicates whether a specified object can be added to the collection.
public bool CanAddNewItem { get; }
true if a specified object can be added to the collection; otherwise false.
Gets a value that indicates whether the editing of an item can be canceled.
public bool CanCancelEdit { get; }
true if CurrentEditItem implements IEditableObject; otherwise, false.
Gets a value that indicates whether this view supports filtering via the property.
public bool CanFilter { get; }
Gets a value that indicates whether this view supports grouping via the property.
public bool CanGroup { get; }
Gets a value that indicates whether an item can be removed from the collection.
public bool CanRemove { get; }
true if an item can be removed from the collection; otherwise, false.
Gets a value that indicates whether this view supports sorting via the property.
public bool CanSort { get; }
Gets the number of elements contained in the ICollection.
public int Count { get; }
Implements:
Gets or sets the cultural info for any operations of the view that may differ by culture, such as sorting.
public virtual CultureInfo Culture { get; set; }
The culture to use during sorting.
Gets the item that is being added during the current add transaction.
public object CurrentAddItem { get; }
The item that is being added if IsAddingNew is true; otherwise, null.
Gets the item in the collection that is being edited.
public object CurrentEditItem { get; }
The item in the collection that is being edited if IsEditingItem is true; otherwise, null.
Gets the current item in the view.
public object CurrentItem { get; }
Gets the ordinal position of the within the view.
public int CurrentPosition { get; }
Gets or sets a value that controls how this DataItemCollection synchronizes its FilterDescriptors, GroupDescriptor and SortDescriptors, as well as GroupDescription and SortDescriptions (if applicable), with its source.
public SynchronizationMode DescriptorsSynchronizationMode { get; set; }
Gets or sets a callback used to determine if an item is suitable for inclusion in the view.
public Predicate<object> Filter { get; set; }
Gets the filter descriptors used for filtering operations.
public CompositeFilterDescriptorCollection FilterDescriptors { get; }
The filter descriptors.
Implements:
GroupDescriptions
ObservableCollection<GroupDescription>
Gets a collection of objects that describe how the items in the collection are grouped in the view.
public ObservableCollection<GroupDescription> GroupDescriptions { get; }
Gets the group descriptors used for grouping operations.
public GroupDescriptorCollection GroupDescriptors { get; }
The group descriptors.
Implements:
Gets the top-level groups.
public ReadOnlyObservableCollection<object> Groups { get; }
Gets a value that indicates whether an add transaction is in progress.
public bool IsAddingNew { get; }
true if an add transaction is in progress; otherwise, false.
Gets a value that indicates whether the of the view is beyond the end of the collection.
public bool IsCurrentAfterLast { get; }
Gets a value that indicates whether the of the view is beyond the beginning of the collection.
public bool IsCurrentBeforeFirst { get; }
Gets a value that indicates whether an edit transaction is in progress.
public bool IsEditingItem { get; }
true if an edit transaction is in progress; otherwise, false.
Returns a value that indicates whether the resulting view is empty.
public bool IsEmpty { get; }
Gets a value that indicates whether a page index change is in process.
public bool IsPageChanging { get; }
true if the page index is changing; otherwise, false.
Implements:
Gets the minimum number of items known to be in the source collection.
public int ItemCount { get; }
The minimum number of items known to be in the source collection.
Implements:
ItemProperties
ReadOnlyCollection<ItemPropertyInfo>
Gets a collection of objects that describes the properties of the items in the collection.
public ReadOnlyCollection<ItemPropertyInfo> ItemProperties { get; }
A collection of objects that describes the properties of the items in the collection.
ItemPropertiesByPropertyName
Dictionary<string, ItemPropertyInfo>
Gets a dictionary of objects that describes the properties of the items in the collection by property name.
public Dictionary<string, ItemPropertyInfo> ItemPropertiesByPropertyName { get; }
A dictionary of objects that describes the properties of the items in the collection by property name.
Gets or sets the type used for all internal data engine operations.
public Type ItemType { get; set; }
The type of the item.
NewItemPlaceholderPosition
NewItemPlaceholderPosition
Gets or sets the position of the new item placeholder in the collection.
public NewItemPlaceholderPosition NewItemPlaceholderPosition { get; set; }
One of the enumeration values that specifies the position of the new item placeholder in the collection.
Gets the zero-based index of the current page.
public int PageIndex { get; }
The zero-based index of the current page.
Implements:
Gets or sets the number of items to display on a page.
public int PageSize { get; set; }
The number of items to display on a page.
Implements:
SortDescriptions
SortDescriptionCollection
Gets a collection of objects that describe how the items in the collection are sorted in the view.
public SortDescriptionCollection SortDescriptions { get; }
Gets the sort descriptors used for sorting operations.
public SortDescriptorCollection SortDescriptors { get; }
The sort descriptors.
Implements:
Returns the underlying collection.
public IEnumerable SourceCollection { get; }
Gets the total number of items in the source collection, or -1 if the total number is unknown.
public int TotalItemCount { get; }
The total number of items in the source collection, or -1 if the total number is unknown.
Implements:
Methods
Adds a new item to the collection.
public object AddNew()
The new item that is added to the collection.
Exceptions:CanAddNew is false.
Ends the edit transaction and discards any pending changes to the item.
public void CancelEdit()
CancelEdit is not supported for the current edit item. Only items implementing IEditableObject are supported.
Ends the add transaction and discards the pending new item.
public void CancelNew()
Removes all items from the IList.
Ends the edit transaction and saves the pending changes.
public void CommitEdit()
Ends the add transaction and saves the pending new item.
public void CommitNew()
Copies the elements of the ICollection to an Array, starting at a particular Array index.
public void CopyTo(Array array, int index)
The one-dimensional Array that is the destination of the elements copied from ICollection. The Array must have zero-based indexing.
indexintThe zero-based index in array at which copying begins.
array is null.
index is less than zero.
array is multidimensional.
-or-
index is equal to or greater than the length of array.
-or-
The number of elements in the source ICollection is greater than the available space from index to the end of the destination array.
The type of the source ICollection cannot be cast automatically to the type of the destination array.
Implements:
Enters a defer cycle that you can use to merge changes to the view and delay automatic refresh.
public IDisposable DeferRefresh()
An IDisposable object that you can use to dispose of the calling object.
Begins an edit transaction of the specified item.
Returns an enumerator that iterates through a collection.
public IEnumerator GetEnumerator()
An IEnumerator object that can be used to iterate through the collection.
Implements:
Inserts an item to the IList at the specified index.
Sets the first item in the view as the .
public bool MoveCurrentToFirst()
True if the resulting is an item within the view; otherwise, false.
Sets the last item in the view as the .
public bool MoveCurrentToLast()
True if the resulting is an item within the view; otherwise, false.
Sets the item after the in the view as the .
public bool MoveCurrentToNext()
True if the resulting is an item within the view; otherwise, false.
Sets the item before the in the view as the .
public bool MoveCurrentToPrevious()
True if the resulting is an item within the view; otherwise, false.
Sets the first page as the current page.
public bool MoveToFirstPage()
true if the operation was successful; otherwise, false.
Implements:
Sets the last page as the current page.
public bool MoveToLastPage()
true if the operation was successful; otherwise, false.
Implements:
Moves to the page after the current page.
public bool MoveToNextPage()
true if the operation was successful; otherwise, false.
Implements:
Moves to the page before the current page.
public bool MoveToPreviousPage()
true if the operation was successful; otherwise, false.
Implements:
Raises the event.
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
The PropertyChangedEventArgs instance containing the event data.
Recreates the view.
public void Refresh()
Removes the specified item from the collection.
Removes the item at the specified position from the collection.
public void RemoveAt(int index)
The position of the item to remove.
Implements:
Events
Occurs when the collection changes.
public event NotifyCollectionChangedEventHandler CollectionChanged
Implements:
When implementing this interface, raise this event after the current item has been changed.
public event EventHandler CurrentChanged
CurrentChanging
CurrentChangingEventHandler
When implementing this interface, raise this event before changing the current item. Event handler can cancel this event.
public event CurrentChangingEventHandler CurrentChanging
This is for internal use only and is not intended to be used directly from your code.
public event EventHandler<NotifyGroupCollectionChangedEventArgs> GroupCollectionChanged
Occurs when the PageIndex has changed.
public event EventHandler<EventArgs> PageChanged
Implements:
Occurs when the PageIndex is changing.
public event EventHandler<PageChangingEventArgs> PageChanging
Implements:
Occurs when a property value changes.
public event PropertyChangedEventHandler PropertyChanged
Implements: