Provides a collection container that enables RadTreeView to maintain a list of its RadTreeViewContextMenus.
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
public class RadTreeViewContextMenuCollection : StateManagedCollection, IList, ICollection, IEnumerable, IStateManager
Inheritance: objectStateManagedCollectionRadTreeViewContextMenuCollection
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadTreeViewContextMenuCollection class for the specified RadTreeView.
public RadTreeViewContextMenuCollection(RadTreeView treeView)
The RadTreeView that the RadTreeViewContextMenuCollection is created for.
Properties
Gets a reference to the RadTreeViewContextMenu at the specified index location in the RadTreeViewContextMenuCollection object.
public RadTreeViewContextMenu this[int index] { get; set; }
The location of the RadTreeViewContextMenu in the RadTreeViewContextMenuCollection
Property Value:The reference to the RadTreeViewContextMenu.
Methods
Adds the specified RadTreeViewContextMenu object to the collection
public void Add(RadTreeViewContextMenu target)
The RadTreeViewContextMenu to add to the collection
Appends the specified array of RadTreeViewContextMenu objects to the end of the current RadTreeViewContextMenuCollection.
public void AddRange(IEnumerable<RadTreeViewContextMenu> contextMenus)
The array of RadTreeViewContextMenu to append to the end of the current RadTreeViewContextMenuCollection.
Determines whether the specified RadTreeViewContextMenu is in the parent RadTreeView's RadTreeViewContextMenuCollection object.
public bool Contains(RadTreeViewContextMenu target)
The RadTreeViewContextMenu to search for in the collection
Returns:true if the specified RadTreeViewContextMenu exists in the collection; otherwise, false.
Copies the RadTreeViewContextMenu instances stored in the RadTreeViewContextMenuCollection object to an System.Array object, beginning at the specified index location in the System.Array.
public void CopyTo(RadTreeViewContextMenu[] array, int index)
The System.Array to copy the RadTreeViewContextMenu instances to.
indexintThe zero-based relative index in array where copying begins
Retrieves the index of a specified RadTreeViewContextMenu object in the collection.
public int IndexOf(RadTreeViewContextMenu target)
The RadTreeViewContextMenu for which the index is returned.
Returns:The index of the specified RadTreeViewContextMenu instance. If the RadTreeViewContextMenu is not currently a member of the collection, it returns -1.
Inserts the specified RadTreeViewContextMenu object to the collection at the specified index location.
public void Insert(int index, RadTreeViewContextMenu target)
The location in the array at which to add the RadTreeViewContextMenu instance.
targetRadTreeViewContextMenuThe RadTreeViewContextMenu to add to the collection
protected override void OnClear()
Overrides:
Removes the specified RadTreeViewContextMenu from the parent RadTreeView's RadTreeViewContextMenuCollection object.
public void Remove(RadTreeViewContextMenu target)
The RadTreeViewContextMenu to be removed
To remove a control from an index location, use the RemoveAt(int) method.
Removes a child RadTreeViewContextMenu, at the specified index location, from the RadTreeViewContextMenuCollection object.
public void RemoveAt(int index)
The ordinal index of the RadTreeViewContextMenu to be removed from the collection.