ClassDataItemCollection
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
CanAddNew
Gets a value that indicates whether a new item can be added to the collection.
Declaration
public bool CanAddNew { get; }
Property Value
true if SourceCollection is not IsFixedSize 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
public bool CanAddNewItem { get; }
Property Value
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
public bool CanCancelEdit { get; }
Property Value
true if CurrentEditItem implements IEditableObject; otherwise, false.
CanChangePage
Gets a value that indicates whether the PageIndex value can change.
CanFilter
Gets a value that indicates whether this view supports filtering via the property.
CanGroup
Gets a value that indicates whether this view supports grouping via the property.
CanRemove
Gets a value that indicates whether an item can be removed from the collection.
Declaration
public bool CanRemove { get; }
Property Value
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 property.
Count
Gets the number of elements contained in the ICollection.
Culture
Gets or sets the cultural info for any operations of the view that may differ by culture, such as sorting.
Declaration
public virtual CultureInfo Culture { get; set; }
Property Value
The culture to use during sorting.
CurrentAddItem
Gets the item that is being added during the current add transaction.
Declaration
public object CurrentAddItem { get; }
Property Value
The item that is being added if IsAddingNew is true; otherwise, null.
CurrentEditItem
Gets the item in the collection that is being edited.
Declaration
public object CurrentEditItem { get; }
Property Value
The item in the collection that is being edited if IsEditingItem is true; otherwise, null.
CurrentItem
Gets the current item in the view.
CurrentPosition
Gets the ordinal position of the within the view.
DescriptorsSynchronizationMode
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.
Declaration
public SynchronizationMode DescriptorsSynchronizationMode { get; set; }
Property Value
Filter
Gets or sets a callback used to determine if an item is suitable for inclusion in the view.
FilterDescriptors
Gets the filter descriptors used for filtering operations.
Declaration
public CompositeFilterDescriptorCollection FilterDescriptors { get; }
Property Value
CompositeFilterDescriptorCollection
The filter descriptors.
Implements
GroupDescriptions
Gets a collection of objects that describe how the items in the collection are grouped in the view.
Declaration
public ObservableCollection<GroupDescription> GroupDescriptions { get; }
Property Value
ObservableCollection<GroupDescription>
GroupDescriptors
Gets the group descriptors used for grouping operations.
Declaration
public GroupDescriptorCollection GroupDescriptors { get; }
Property Value
The group descriptors.
Implements
Groups
Gets the top-level groups.
Declaration
public ReadOnlyObservableCollection<object> Groups { get; }
Property Value
IsAddingNew
Gets a value that indicates whether an add transaction is in progress.
Declaration
public bool IsAddingNew { get; }
Property Value
true if an add transaction is in progress; otherwise, false.
IsCurrentAfterLast
Gets a value that indicates whether the of the view is beyond the end of the collection.
IsCurrentBeforeFirst
Gets a value that indicates whether the of the view is beyond the beginning of the collection.
IsEditingItem
Gets a value that indicates whether an edit transaction is in progress.
Declaration
public bool IsEditingItem { get; }
Property Value
true if an edit transaction is in progress; otherwise, false.
IsEmpty
Returns a value that indicates whether the resulting view is empty.
IsPageChanging
Gets a value that indicates whether a page index change is in process.
Declaration
public bool IsPageChanging { get; }
Property Value
true if the page index is changing; otherwise, false.
Implements
ItemCount
Gets the minimum number of items known to be in the source collection.
Declaration
public int ItemCount { get; }
Property Value
The minimum number of items known to be in the source collection.
Implements
ItemProperties
Gets a collection of objects that describes the properties of the items in the collection.
Declaration
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
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
public Type ItemType { get; set; }
Property Value
The type of the item.
NewItemPlaceholderPosition
Gets or sets the position of the new item placeholder in the collection.
Declaration
public 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
public int PageIndex { get; }
Property Value
The zero-based index of the current page.
Implements
PageSize
Gets or sets the number of items to display on a page.
Declaration
public int PageSize { get; set; }
Property Value
The number of items to display on a page.
Implements
SortDescriptions
Gets a collection of objects that describe how the items in the collection are sorted in the view.
Declaration
public SortDescriptionCollection SortDescriptions { get; }
Property Value
SortDescriptionCollection
SortDescriptors
Gets the sort descriptors used for sorting operations.
Declaration
public SortDescriptorCollection SortDescriptors { get; }
Property Value
The sort descriptors.
Implements
SourceCollection
Returns the underlying collection.
Declaration
public IEnumerable SourceCollection { get; }
Property Value
TotalItemCount
Gets the total number of items in the source collection, or -1 if the total number is unknown.
Declaration
public int TotalItemCount { get; }
Property Value
The total number of items in the source collection, or -1 if the total number is unknown.
Implements
Methods
Add(object)
Adds an item to the IList.
AddNew()
Adds a new item to the collection.
Declaration
public object AddNew()
Returns
The new item that is added to the collection.
Exceptions
CanAddNew is false.
AddNewItem(object)
Adds the specified object to the collection.
CancelEdit()
Ends the edit transaction and discards any pending changes to the item.
Declaration
public void CancelEdit()
Exceptions
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
public void CancelNew()
Clear()
Removes all items from the IList.
CommitEdit()
Ends the edit transaction and saves the pending changes.
Declaration
public void CommitEdit()
CommitNew()
Ends the add transaction and saves the pending new item.
Declaration
public void CommitNew()
Contains(object)
Determines whether the IList contains a specific value.
CopyTo(Array, int)
Copies the elements of the ICollection to an Array, starting at a particular Array index.
Declaration
public void CopyTo(Array array, int index)
Parameters
array
The one-dimensional Array that is the destination of the elements copied from ICollection. The Array must have zero-based indexing.
index
The zero-based index in array at which copying begins.
Exceptions
array is null.
index is less than zero.
<code class="paramref">array</code> 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
DeferRefresh()
Enters a defer cycle that you can use to merge changes to the view and delay automatic refresh.
Declaration
public IDisposable DeferRefresh()
Returns
An IDisposable object that you can use to dispose of the calling object.
EditItem(object)
Begins an edit transaction of the specified item.
Declaration
public void EditItem(object item)
Parameters
item
The item to edit.
GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
public IEnumerator GetEnumerator()
Returns
An IEnumerator object that can be used to iterate through the collection.
Implements
IndexOf(object)
Determines the index of a specific item in the IList.
Insert(int, object)
Inserts an item to the IList at the specified index.
Declaration
public void Insert(int index, object value)
Parameters
index
The zero-based index at which value should be inserted.
value
Exceptions
index is not a valid index in the IList.
The IList is read-only. -or- The IList has a fixed size.
value is null reference in the IList.
Implements
MoveCurrentTo(object)
Sets the specified item to be the in the view.
MoveCurrentToFirst()
Sets the first item in the view as the .
Declaration
public bool MoveCurrentToFirst()
Returns
True if the resulting is an item within the view; otherwise, false.
MoveCurrentToLast()
Sets the last item in the view as the .
Declaration
public bool MoveCurrentToLast()
Returns
True if the resulting is an item within the view; otherwise, false.
MoveCurrentToNext()
Sets the item after the in the view as the .
Declaration
public bool MoveCurrentToNext()
Returns
True if the resulting is an item within the view; otherwise, false.
MoveCurrentToPosition(int)
Sets the item at the specified index to be the in the view.
MoveCurrentToPrevious()
Sets the item before the in the view as the .
Declaration
public bool MoveCurrentToPrevious()
Returns
True if the resulting is an item within the view; otherwise, false.
MoveToFirstPage()
Sets the first page as the current page.
Declaration
public bool MoveToFirstPage()
Returns
true if the operation was successful; otherwise, false.
Implements
MoveToLastPage()
Sets the last page as the current page.
Declaration
public bool MoveToLastPage()
Returns
true if the operation was successful; otherwise, false.
Implements
MoveToNextPage()
Moves to the page after the current page.
Declaration
public bool MoveToNextPage()
Returns
true if the operation was successful; otherwise, false.
Implements
MoveToPage(int)
Requests a page move to the page at the specified index.
MoveToPreviousPage()
Moves to the page before the current page.
Declaration
public bool MoveToPreviousPage()
Returns
true if the operation was successful; otherwise, false.
Implements
OnPropertyChanged(PropertyChangedEventArgs)
Raises the event.
Declaration
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
Parameters
e
The PropertyChangedEventArgs instance containing the event data.
Remove(object)
Removes the specified item from the collection.
Declaration
public void Remove(object item)
Parameters
item
The item to remove.
Implements
RemoveAt(int)
Removes the item at the specified position from the collection.
Declaration
public void RemoveAt(int index)
Parameters
index
The position of the item to remove.
Implements
Events
CollectionChanged
Occurs when the collection changes.
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Value
Implements
CurrentChanged
When implementing this interface, raise this event after the current item has been changed.
CurrentChanging
When implementing this interface, raise this event before changing the current item. Event handler can cancel this event.
Declaration
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
public event EventHandler<NotifyGroupCollectionChangedEventArgs> GroupCollectionChanged
Event Value
PageChanged
Occurs when the PageIndex has changed.
Declaration
public event EventHandler<EventArgs> PageChanged
Event Value
Implements
PageChanging
Occurs when the PageIndex is changing.
Declaration
public event EventHandler<PageChangingEventArgs> PageChanging
Event Value
Implements
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Value
Implements