Represents a collection of ReportItemBase objects.
Definition
Namespace:Telerik.Reporting
Assembly:Telerik.Reporting.dll
Syntax:
public class ReportItemBase.ItemCollection : Collection<ReportItemBase>
Inheritance: objectCollection<ReportItemBase>ReportItemBase.ItemCollection
Constructors
Initializes a new instance of the ReportItemBase.ItemCollection class.
public ItemCollection(ReportItemBase owner)
A ReportItemBase representing the report item that owns the report item collection.
Properties
Returns the ReportItemBase with the specified key in the collection.
public virtual ReportItemBase this[string key] { get; }
The name of the report item to retrieve from the report item collection.
Property Value:The ReportItemBase with the specified key in the collection.
Methods
Adds an array of report item objects to the collection.
public virtual void AddRange(ReportItemBase[] items)
An array of ReportItemBase objects to add to the collection.
The ReportItemBase objects contained in the items array are appended to the end of the collection.
You can use the AddRange method to quickly add a group of ReportItemBase objects to the collection instead of manually adding each ReportItemBase to the collection using the Add(T) method.
To remove a ReportItemBase that you previously added, use the Remove(T), RemoveAt(int), or Clear() methods.
TODO: Add documentation.
protected override void ClearItems()
Overrides:
Determines whether the ReportItemBase.ItemCollection contains an item with the specified key.
public virtual bool ContainsKey(string key)
The key to locate in the ReportItemBase.ItemCollection.
Returns:bool
true if the ReportItemBase.ItemCollection contains an item with the specified key; otherwise, false.
The Name property of a ReportItemBase corresponds to the key for a ReportItemBase in the ReportItemBase.ItemCollection.
Searches for report items by their Name property and builds an array of all the report items that match.
public virtual ReportItemBase[] Find(string key, bool recursive)
The key to locate in the ReportItemBase.ItemCollection.
recursivebooltrue to search all child report items; otherwise, false.
Returns:An array of type ReportItemBase containing the matching report items.
Exceptions:ArgumentNullException
The key parameter is null or empty.
Searches for report items by their Type and builds an array of all the items that match.
public virtual ReportItemBase[] Find(Type type, bool recursive)
The Type to search for.
recursiveboolA value indicating whether to search all children recursively.
Returns:An array of type ReportItemBase containing the matching report items.
Searches for report items by their Type and builds an array of all the items that match.
public virtual ReportItemBase[] Find(Type type)
The Type to search for.
Returns:An array of type ReportItemBase containing the matching report items.
Searches the collection for a report item of the specified type.
public virtual ReportItemBase FindItem(Type type)
The Type to search for.
Returns:The first ReportItemBase in the collection that matches the given Type. If no item in the collection matches the given Type the method returns null.
Retrieves the index of the specified child report item within the item collection, and optionally raises an exception if the specified report item is not within the item collection.
public virtual int GetChildIndex(ReportItemBase child, bool throwException)
The ReportItemBase to search for in the item collection.
throwExceptionbooltrue to throw an exception if the ReportItemBase specified in the child parameter is not an item in the ReportItemBase.ItemCollection; otherwise, false.
Returns:int
A zero-based index value that represents the location of the specified child report item within the item collection; otherwise -1 if the specified ReportItemBase is not found in the ReportItemBase.ItemCollection.
Exceptions:ArgumentException
The child is not contained in the collection and the throwException parameter is true.
Retrieves the index of a report item within the item collection.
public int GetChildIndex(ReportItemBase child)
The ReportItemBase to search for in the item collection.
Returns:int
A zero-based index value that represents the location of the specified child report item within the item collection.
Retrieves the index of the first occurrence of the specified item within the collection.
public virtual int IndexOfKey(string key)
The name of the report item to search for.
Returns:int
The zero-based index of the first occurrence of the report item with the specified name in the collection.
The key comparison is not case-sensitive. If the key parameter is a null reference (Nothing in Visual Basic) or an empty string, or an item with the specified key is not found, IndexOfKey returns -1.
The Name property of a ReportItemBase corresponds to the key for a ReportItemBase in the ReportItemBase.ItemCollection.
Overrides the InsertItem(int, T) method to perform validation and notify the owner when a new item is inserted.
protected override void InsertItem(int index, ReportItemBase item)
The zero-based index at which to insert the item.
itemReportItemBaseThe new ReportItemBase to insert at the specified index.
Overrides:
Removes the child report item with the specified key.
public virtual void RemoveByKey(string key)
The name of the child report item to remove.
The Name property of a ReportItemBase corresponds to the key for a ReportItemBase in the ReportItemBase.ItemCollection.
Overrides the RemoveItem(int) method to perform additional logic when an item is removed from the collection.
protected override void RemoveItem(int index)
The zero-based index of the item to remove.
Overrides:
TODO: Add documentation.
protected override void SetItem(int index, ReportItemBase item)
Overrides: