Exposes either groups generated from the list view's data view or caller-defined groups. Collection access uses caller-defined groups when EnableCustomGrouping is enabled or the list view is in design mode. Event forwarding is controlled by EnableCustomGrouping and is suppressed during update batches.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class ListViewDataItemGroupCollection : IList, ICollection, IEnumerable, INotifyCollectionChanged
Inheritance: objectListViewDataItemGroupCollection
Implements:
Constructors
Creates a group collection associated with the specified list view element.
public ListViewDataItemGroupCollection(RadListViewElement owner)
The element that owns and configures the groups.
Fields
Holds groups generated from the list view's data-view group descriptors.
protected ObservableCollection<ListViewDataItemGroup> autoGroups
Holds groups added directly through this collection.
protected ObservableCollection<ListViewDataItemGroup> customGroups
References the list view element that supplies the grouping mode and data view.
protected RadListViewElement owner
Properties
Gets the number of groups in the active collection.
public int Count { get; }
Implements:
Gets whether the active collection is read-only. Automatically generated groups are read-only; custom groups can be edited when custom grouping is enabled or in design mode.
public bool IsReadOnly { get; }
Implements:
Gets whether access to the active group collection is synchronized.
public bool IsSynchronized { get; }
Implements:
Gets the synchronization object used by the active group collection.
public object SyncRoot { get; }
Implements:
Gets a group from the active collection or replaces a group in the custom group list.
public ListViewDataItemGroup this[int index] { get; set; }
The zero-based position in the active collection or custom group list.
Property Value:The group at the specified position.
Methods
Adds a group to the custom group list. The custom list is active when custom grouping is enabled or the list view is in design mode.
public void Add(ListViewDataItemGroup item)
The group to add.
Adds each group to the custom group list while collection change notifications are suppressed. The custom groups are active when custom grouping is enabled or the list view is in design mode.
public virtual void AddRange(params ListViewDataItemGroup[] listViewDataItemGroups)
The groups to add.
Suppresses forwarding of group collection change notifications raised during the batch. Pair this call with EndUpdate() to restore notification forwarding.
public virtual void BeginUpdate()
Removes all groups from the custom group list; automatically generated groups are not cleared.
public void Clear()
Implements:
Determines whether the active collection contains the specified group.
public bool Contains(ListViewDataItemGroup item)
The group to locate.
Returns:true if the active collection contains the group; otherwise, false.
Copies the groups in the active collection into an array.
public void CopyTo(ListViewDataItemGroup[] array, int arrayIndex)
The destination array.
arrayIndexintThe zero-based destination index at which copying begins.
Ends one notification-suppression batch started by BeginUpdate().
public virtual void EndUpdate()
Applies the owner's active filter to the group's item view when filtering is enabled.
protected virtual void EnsureFilterPredicate(ListViewDataItemGroup item)
The group whose item view receives the filter.
Enumerates the groups in the active collection.
public IEnumerator<ListViewDataItemGroup> GetEnumerator()
IEnumerator<ListViewDataItemGroup>
An enumerator over the active groups.
Finds a group in the active collection.
public int IndexOf(ListViewDataItemGroup item)
The group to locate.
Returns:The zero-based position of the group, or -1 if it is not in the active collection.
Inserts a group into the custom group list. The custom list is active when custom grouping is enabled or the list view is in design mode.
public void Insert(int index, ListViewDataItemGroup item)
The zero-based insertion position.
itemListViewDataItemGroupThe group to insert.
Removes a group from the custom group list.
public bool Remove(ListViewDataItemGroup item)
The group to remove.
Returns:true if the custom group list contained and removed the group; otherwise, false.
Removes the custom group at the specified position.
public void RemoveAt(int index)
The zero-based position of the group to remove.
Implements:
Events
Occurs when automatic groups change while custom grouping is disabled or custom groups change while it is enabled. Notifications raised during update batches are suppressed. In design mode, collection access uses custom groups even when event forwarding still follows the property value.
public event NotifyCollectionChangedEventHandler CollectionChanged
Implements: