ClassCheckedItemTraverser
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:
public class CheckedItemTraverser : ItemsTraverser<RadListDataItem>, ITraverser<RadListDataItem>, IDisposable, IEnumerator, IEnumerable
Inheritance: objectItemsTraverser<RadListDataItem>CheckedItemTraverser
Implements:
Inherited Members
Constructors
CheckedItemTraverser(IList<RadListDataItem>, CheckAllDataItem, bool)
Initializes a new instance of the CheckedItemTraverser class.
Declaration
public CheckedItemTraverser(IList<RadListDataItem> collection, CheckAllDataItem checkAllItem, bool checkAll)
Parameters
collection
IList<RadListDataItem>
The collection of data items to traverse.
checkAllItem
The CheckAll item to prepend when checkAll is true.
checkAll
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.
CheckAllItem
Gets or sets the CheckAllDataItem that is prepended to the traversal sequence when CheckAll is enabled.
Declaration
public CheckAllDataItem CheckAllItem { get; set; }
Property Value
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
public override IEnumerator GetEnumerator()
Returns
An IEnumerator for the traversal sequence.
Overrides
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
protected override bool MoveNextCore()
Returns
true if the traverser successfully moved to the next item; false if the end was reached.
Overrides
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
protected override bool MovePreviousCore()
Returns
true if the traverser successfully moved to the previous item; false if the beginning was reached.
Overrides