New to Telerik UI for WinForms? Start a free 30-day trial

Provides read-only access to the items in a ListViewDataItemGroup. When backed by a RadListSource<TDataItem>, operations use its collection view; when backed by a data group's item list, they use that list directly.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class ListViewGroupedItemsCollection : IReadOnlyCollection<ListViewDataItem>, IEnumerable, IDisposable

Inheritance: objectListViewGroupedItemsCollection

Implements: IDisposableIEnumerableIReadOnlyCollection<ListViewDataItem>

Constructors

Creates an empty group-item collection backed by a new list source.

C#
public ListViewGroupedItemsCollection()

Properties

Gets the number of items in the active group view.

C#
public int Count { get; }

Implements: IReadOnlyCollection<ListViewDataItem>.Count

Gets or replaces the underlying item list. Replacing a current RadListSource<TDataItem> disposes that source.

C#
protected IList<ListViewDataItem> InnerList { get; set; }
Property Value:

The list or list source that supplies the group's items.

Gets the item at the specified position in the active group view.

C#
public ListViewDataItem this[int index] { get; }
Parameters:indexint

The zero-based position of the item.

Property Value:

The item at the specified position.

Implements: IReadOnlyCollection<ListViewDataItem>.this[int]

Methods

Determines whether the active group view contains the specified item.

C#
public bool Contains(ListViewDataItem value)
Parameters:valueListViewDataItem

The item to locate.

Returns:

bool

true if the item is present; otherwise, false.

Implements: IReadOnlyCollection<ListViewDataItem>.Contains(ListViewDataItem)

Copies the items in the active group view into an array.

C#
public void CopyTo(ListViewDataItem[] array, int index)
Parameters:arrayListViewDataItem[]

The destination array.

indexint

The zero-based destination index at which copying begins.

Implements: IReadOnlyCollection<ListViewDataItem>.CopyTo(ListViewDataItem[], int)

Disposes the backing list when it implements IDisposable.

C#
public void Dispose()

Implements: IDisposable.Dispose()

Enumerates the items in the active group view.

C#
public IEnumerator<ListViewDataItem> GetEnumerator()
Returns:

IEnumerator<ListViewDataItem>

An enumerator over the group items.

Finds the position of an item in the active group view.

C#
public int IndexOf(ListViewDataItem value)
Parameters:valueListViewDataItem

The item to locate.

Returns:

int

The zero-based position, or -1 if the item is not present.

Implements: IReadOnlyCollection<ListViewDataItem>.IndexOf(ListViewDataItem)

Replaces the backing list with a new empty list source that does not change the current item when items are added.

C#
public void ResetListSource()