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

Provides access to the data items displayed by a RadTreeMapElement.

The collection is backed by the tree map's list source. Items moved from another tree map are removed from their previous owner before being added here.

Definition

Namespace:Telerik.WinControls.UI.TreeMap

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class TreeMapDataItemCollection : IList, ICollection, IEnumerable, INotifyCollectionChanged

Inheritance: objectTreeMapDataItemCollection

Implements: ICollectionIEnumerableIListINotifyCollectionChanged

Constructors

Initializes a collection associated with the specified tree map element.

C#
public TreeMapDataItemCollection(RadTreeMapElement owner)
Parameters:ownerRadTreeMapElement

The element whose item list this collection exposes.

Properties

Gets the number of items in the current collection view.

C#
public int Count { get; }

Implements: ICollection.Count

Gets whether this collection has a fixed size.

C#
public bool IsFixedSize { get; }

Implements: IList.IsFixedSize

This property always returns false; it does not indicate whether the current data source allows programmatic edits.

Gets whether the underlying list source permits item changes.

C#
public bool IsReadOnly { get; }

Implements: IList.IsReadOnly

Gets whether access to the underlying list source is synchronized.

C#
public bool IsSynchronized { get; }

Implements: ICollection.IsSynchronized

This value is provided by the list source; this collection adds no synchronization.

Gets the synchronization object supplied by the underlying list source.

C#
public object SyncRoot { get; }

Implements: ICollection.SyncRoot

Gets or replaces the item at a position in the tree map's current collection view.

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

The zero-based position of the item.

Methods

Creates an item through the tree map's item-creation hook and adds it with the specified value.

C#
public void Add(double value)
Parameters:valuedouble

The numeric value used by the tree map layout algorithm.

The item is created through NewItem(), so the ItemCreating event can customize or replace it.

Creates an item through the tree map's item-creation hook and adds it with the specified text and value.

C#
public void Add(string text, double value)
Parameters:textstring

The item's explicit display text; a bound display value is used only when this is null.

valuedouble

The numeric value used by the tree map layout algorithm.

The item is created through NewItem(), so the ItemCreating event can customize or replace it.

Adds an item, removing it from a different tree map first when necessary.

C#
public void Add(TreeMapDataItem item)
Parameters:itemTreeMapDataItem

The item to add.

Adds the specified items while batching updates to the underlying list source.

C#
public virtual void AddRange(params TreeMapDataItem[] TreeMapDataItems)
Parameters:TreeMapDataItemsTreeMapDataItem[]

The items to add.

Begins a batch of changes to the underlying item list.

C#
public void BeginUpdate()

Call EndUpdate() after the batch so the list source can resume its normal update processing.

Removes all items and clears their Owner references.

C#
public void Clear()

Implements: IList.Clear()

Determines whether the collection contains the specified object when it is a tree map item.

C#
public bool Contains(object value)
Parameters:valueobject

The object to locate.

Returns:

bool

true if value is a contained TreeMapDataItem; otherwise, false.

Implements: IList.Contains(object)

Determines whether the current collection view contains the specified item.

C#
public bool Contains(TreeMapDataItem item)
Parameters:itemTreeMapDataItem

The item to locate.

Returns:

bool

true if the item is present; otherwise, false.

Copies the underlying list source's items to an array, beginning at the specified array index.

C#
public void CopyTo(Array array, int index)
Parameters:arrayArray

The destination array.

indexint

The zero-based destination index at which copying begins.

Implements: ICollection.CopyTo(Array, int)

Copies the items in the current collection view to an array, beginning at the specified array index.

C#
public void CopyTo(TreeMapDataItem[] array, int arrayIndex)
Parameters:arrayTreeMapDataItem[]

The destination array.

arrayIndexint

The zero-based destination index at which copying begins.

Ends a batch of changes previously started by BeginUpdate().

C#
public void EndUpdate()

Returns an enumerator over the items in the current collection view.

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

IEnumerator<TreeMapDataItem>

An enumerator for the tree map's current item view.

Returns the position of the specified object when it is a tree map item.

C#
public int IndexOf(object value)
Parameters:valueobject

The object to locate.

Returns:

int

The item's zero-based position, or -1 if it is not a tree map item in this collection view.

Implements: IList.IndexOf(object)

Returns the position of an item in the tree map's current collection view.

C#
public int IndexOf(TreeMapDataItem item)
Parameters:itemTreeMapDataItem

The item to locate.

Returns:

int

The item's zero-based position, or -1 if it is not in the collection view.

Inserts the specified object when it is a TreeMapDataItem.

C#
public void Insert(int index, object value)
Parameters:indexint

The zero-based position at which to insert the item.

valueobject

The object to insert; objects of other types are ignored.

Implements: IList.Insert(int, object)

Inserts an item at the specified position, removing it from a different tree map first when necessary.

C#
public void Insert(int index, TreeMapDataItem item)
Parameters:indexint

The zero-based position at which to insert the item.

itemTreeMapDataItem

The item to insert.

Exceptions: InvalidOperationException

The underlying list source rejects the insertion, including when items are added programmatically while the tree map is data-bound.

Raises the CollectionChanged event.

C#
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters:argsNotifyCollectionChangedEventArgs

The change details supplied by the collection view.

Removes the specified object when it is a TreeMapDataItem.

C#
public void Remove(object value)
Parameters:valueobject

The object to remove; objects of other types are ignored.

Implements: IList.Remove(object)

Removes the specified item from the list source and clears its owner reference.

C#
public bool Remove(TreeMapDataItem item)
Parameters:itemTreeMapDataItem

The item to remove.

Returns:

bool

true if the list source removed the item; otherwise, false.

The item's Owner is cleared even when the list source reports that the item was not present.

Removes the item at the specified position.

C#
public void RemoveAt(int index)
Parameters:indexint

The zero-based position of the item to remove.

Implements: IList.RemoveAt(int)

Events

Occurs when the underlying collection view adds, removes, replaces, or resets items.

C#
public event NotifyCollectionChangedEventHandler CollectionChanged

Implements: INotifyCollectionChanged.CollectionChanged