Class
CheckedItemTraverser

A traverser that extends ItemsTraverser<T> to optionally prepend a CheckAllDataItem before the regular collection items. When CheckAll is enabled, position 0 represents the CheckAllItem and all collection items are shifted by one (position N maps to Collection[N-1]).

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

cs-api-definition
public class CheckedItemTraverser : ItemsTraverser<RadListDataItem>, ITraverser<RadListDataItem>, IDisposable, IEnumerator, IEnumerable

Inheritance: objectItemsTraverser<RadListDataItem>CheckedItemTraverser

Implements: IDisposableIEnumerableIEnumeratorITraverser<RadListDataItem>

Inherited Members ItemsTraverser<RadListDataItem>.enumeratorItemsTraverser<RadListDataItem>.MoveNext()ItemsTraverser<RadListDataItem>.Reset()ItemsTraverser<RadListDataItem>.MovePrevious()ItemsTraverser<RadListDataItem>.MoveToEnd()ItemsTraverser<RadListDataItem>.Enumerator_ItemsNavigating(object, ItemsNavigatingEventArgs<RadListDataItem>)ItemsTraverser<RadListDataItem>.Dispose()ItemsTraverser<RadListDataItem>.OnItemsNavigating(RadListDataItem)ItemsTraverser<RadListDataItem>.CollectionItemsTraverser<RadListDataItem>.CurrentItemsTraverser<RadListDataItem>.PositionItemsTraverser<RadListDataItem>.InternalCurrentItemsTraverser<RadListDataItem>.InternalPositionItemsTraverser<RadListDataItem>.ItemsNavigating

Constructors

CheckedItemTraverser(IList<RadListDataItem>, CheckAllDataItem, bool)

Initializes a new instance of the CheckedItemTraverser class.

Declaration

cs-api-definition
public CheckedItemTraverser(IList<RadListDataItem> collection, CheckAllDataItem checkAllItem, bool checkAll)

Parameters

collection

IList<RadListDataItem>

The collection of data items to traverse.

checkAllItem

CheckAllDataItem

The CheckAll item to prepend when checkAll is true.

checkAll

bool

Whether the CheckAll item should be included in the traversal.

Properties

CheckAll

Gets or sets a value indicating whether the CheckAllItem is included as the first item in the traversal sequence.

Declaration

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

Property Value

bool

CheckAllItem

Gets or sets the CheckAllDataItem that is prepended to the traversal sequence when CheckAll is enabled.

Declaration

cs-api-definition
public CheckAllDataItem CheckAllItem { get; set; }

Property Value

CheckAllDataItem

Methods

GetEnumerator()

Returns an enumerator that iterates through the traversal sequence starting from the current position. The enumerator state is synchronized using the internal position and current item directly, bypassing the base Position setter which cannot represent the CheckAllItem.

Declaration

cs-api-definition
public override IEnumerator GetEnumerator()

Returns

IEnumerator

An IEnumerator for the traversal sequence.

Overrides ItemsTraverser<RadListDataItem>.GetEnumerator()

MoveNextCore()

Moves the traverser one position forward. When CheckAll is enabled, the first call from the reset state (position -1) yields the CheckAllItem at position 0. Subsequent calls yield Collection[position - 1]. Returns false when all items have been visited.

Declaration

cs-api-definition
protected override bool MoveNextCore()

Returns

bool

true if the traverser successfully moved to the next item; false if the end was reached.

Overrides ItemsTraverser<RadListDataItem>.MoveNextCore()

MovePreviousCore()

Moves the traverser one position backward. When CheckAll is enabled, position 0 maps to the CheckAllItem and positions above 0 map to Collection[position - 1]. Returns false when there are no more items.

Declaration

cs-api-definition
protected override bool MovePreviousCore()

Returns

bool

true if the traverser successfully moved to the previous item; false if the beginning was reached.

Overrides ItemsTraverser<RadListDataItem>.MovePreviousCore()