New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Represents a collection of ContextMenuTarget objects.

Definition

Constructors

Initializes a new instance of the ContextMenuTargetCollection class.

C#
public ContextMenuTargetCollection(RadContextMenu owner)
Parameters:ownerRadContextMenu

The owner of the collection.

Properties

Gets the ContextMenuTarget object at the specified index in the current ContextMenuTargetCollection.

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

The zero-based index of the ContextMenuTarget to retrieve.

Property Value:

The ContextMenuTarget at the specified index in the current ContextMenuTargetCollection.

Methods

Appends the specified ContextMenuTarget object to the end of the current ContextMenuTargetCollection.

C#
public void Add(ContextMenuTarget target)
Parameters:targetContextMenuTarget

The ContextMenuTarget to append to the end of the current ContextMenuTargetCollection.

Appends the specified array of ContextMenuTarget objects to the end of the current ContextMenuTargetCollection.

C#
public void AddRange(IEnumerable<ContextMenuTarget> targets)

targets

IEnumerable<ContextMenuTarget>

The array of <xref href="Telerik.Web.UI.ContextMenuTarget?text=ContextMenuTarget" data-throw-if-not-resolved="false"></xref> o append to the end of the current

ContextMenuTargetCollection.

Determines whether the specified ContextMenuTarget object is in the current ContextMenuTargetCollection.

C#
public bool Contains(ContextMenuTarget target)
Parameters:targetContextMenuTarget

The ContextMenuTarget object to find.

Returns:

bool

true if the current collection contains the specified ContextMenuTarget object; otherwise, false.

Copies the contents of the current ContextMenuTargetCollection into the specified array of ContextMenuTarget objects.

C#
public void CopyTo(ContextMenuTarget[] array, int index)
Parameters:arrayContextMenuTarget[]

The target array.

indexint

The index to start copying from.

Determines the index of the specified ContextMenuTarget object in the collection.

C#
public int IndexOf(ContextMenuTarget target)
Parameters:targetContextMenuTarget

The ContextMenuTarget to locate.

Returns:

int

The zero-based index of tab within the current ContextMenuTargetCollection, if found; otherwise, -1.

Inserts the specified ContextMenuTarget object in the current ContextMenuTargetCollection at the specified index location.

C#
public void Insert(int index, ContextMenuTarget target)
Parameters:indexint

The zero-based index location at which to insert the ContextMenuTarget.

targetContextMenuTarget

The ContextMenuTarget to insert.

C#
protected override void OnClear()

Overrides: StateManagedCollection.OnClear()

C#
protected override void OnInsertComplete(int index, object value)
Parameters:indexintvalueobject

Overrides: StateManagedCollection.OnInsertComplete(int, object)

C#
protected override void OnRemoveComplete(int index, object value)
Parameters:indexintvalueobject

Overrides: StateManagedCollection.OnRemoveComplete(int, object)

Removes the specified ContextMenuTarget object from the current ContextMenuTargetCollection.

C#
public void Remove(ContextMenuTarget target)
Parameters:targetContextMenuTarget

The ContextMenuTarget object to remove.

Removes the ContextMenuTarget object at the specified index from the current ContextMenuTargetCollection.

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

The zero-based index of the tab to remove.

C#
protected override void SetDirtyObject(object o)
Parameters:oobject

Overrides: StateManagedCollection.SetDirtyObject(object)