A collection of RadTreeNode objects in a RadTreeView control.
The RadTreeNodeCollection class represents a collection of RadTreeNode objects.
- Use the this[int] to programmatically retrieve a single RadTreeNode from the collection, using array notation.
- Use the Count property to determine the total number of menu items in the collection.
- Use the Add(RadTreeNode) method to add nodes in the collection.
- Use the Remove(RadTreeNode) method to remove nodes from the collection.
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
public class RadTreeNodeCollection : ControlItemCollection, IList, ICollection, IEnumerable, IStateManager
Inheritance: objectStateManagedCollectionControlItemCollectionRadTreeNodeCollection
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadTreeNodeCollection class.
public RadTreeNodeCollection(Control parent)
The owner of the collection.
Properties
Gets the RadTreeNodeobject at the specified index in the current RadTreeNodeCollection.
public RadTreeNode this[int index] { get; set; }
The zero-based index of the RadTreeNode to retrieve.
Property Value:The RadTreeNode at the specified index in the current RadTreeNodeCollection.
Methods
Appends the specified RadTreeNode object to the end of the current RadTreeNodeCollection.
public void Add(RadTreeNode node)
The RadTreeNode to append to the end of the current RadTreeNodeCollection.
Appends the specified array of RadTreeNode objects to the end of the current RadTreeNodeCollection.
public virtual void AddRange(IEnumerable<RadTreeNode> nodes)
The array of RadTreeNode to append to the end of the current RadTreeNodeCollection.
Determines whether the specified RadTreeNode object is in the current RadTreeNodeCollection.
public virtual bool Contains(RadTreeNode node)
The RadTreeNode object to find.
Returns:true if the current collection contains the specified RadTreeNode object;
otherwise, false.
Copies the RadTreeNode instances stored in the current RadTreeNodeCollection object to an System.Array object, beginning at the specified index location in the System.Array.
public virtual void CopyTo(RadTreeNode[] array, int index)
The System.Array to copy the RadTreeNode instances to.
indexintThe zero-based relative index in array where copying begins.
Returns the first RadTreeNode that matches the conditions defined by the specified predicate. The predicate should returns a boolean value.
public RadTreeNode FindNode(Predicate<RadTreeNode> match)
The Predicate <> that defines the conditions of the element to search for.
Returns:Searches the nodes in the collection for a RadTreeNode which contains the specified attribute and attribute value.
public RadTreeNode FindNodeByAttribute(string attributeName, string attributeValue)
The name of the target attribute.
attributeValuestringThe value of the target attribute
Returns:The RadTreeNode that matches the specified arguments. Null (Nothing) is returned if no node is found.
This method is not recursive.
Searches all nodes for a
public RadTreeNode FindNodeByText(string text, bool ignoreCase)
The text to search for
ignoreCaseboolA Boolean indicating a case-sensitive or insensitive comparison (true indicates a case-insensitive comparison).
Returns:A RadTreeNode whose Text property equals to the specified argument. Null (Nothing) is returned when no matching node is found.
This method is not recursive.
Searches all nodes for a
public RadTreeNode FindNodeByText(string text)
The text to search for
Returns:A RadTreeNode whose Text property equals to the specified argument. Null (Nothing) is returned when no matching node is found.
This method is not recursive.
Searches all nodes for a
public RadTreeNode FindNodeByValue(string value, bool ignoreCase)
The value to search for
ignoreCaseboolA Boolean indicating a case-sensitive or insensitive comparison (true indicates a case-insensitive comparison).
Returns:A RadTreeNode whose Value property equals to the specified argument. Null (Nothing) is returned when no matching node is found.
This method is not recursive.
Searches all nodes for a
public RadTreeNode FindNodeByValue(string value)
The value to search for
Returns:A RadTreeNode whose Value property equals to the specified argument. Null (Nothing) is returned when no matching node is found.
This method is not recursive.
Determines the index of the specified RadTreeNode object in the collection.
public virtual int IndexOf(RadTreeNode node)
The RadTreeNode to locate.
Returns:The zero-based index of tab within the current RadTreeNodeCollection, if found; otherwise, -1.
Inserts the specified RadTreeNode object in the current RadTreeNodeCollection at the specified index location.
public virtual void Insert(int index, RadTreeNode node)
The zero-based index location at which to insert the RadTreeNode.
nodeRadTreeNodeThe RadTreeNode to insert.
Removes the specified RadTreeNode object from the current RadTreeNodeCollection.
Removes the RadTreeNode object at the specified index from the current RadTreeNodeCollection.