Class ReportItemBase.ItemCollection
Represents a collection of
Report
Inheritance
Namespace: Telerik.Reporting
Assembly: Telerik.Reporting.dll
Syntax
public class ItemCollection : Collection<ReportItemBase>, IList<ReportItemBase>, ICollection<ReportItemBase>, IList, ICollection, IReadOnlyList<ReportItemBase>, IReadOnlyCollection<ReportItemBase>, IEnumerable<ReportItemBase>, IEnumerable
Remarks
The System.
Constructors
ItemCollection(ReportItemBase)
Initializes a new instance of the
Report
Declaration
public ItemCollection(ReportItemBase owner)
Parameters
Report A Report |
Properties
Item[String]
Returns the Report
Declaration
public virtual ReportItemBase this[string key] { get; }
Parameters
System. The name of the report item to retrieve from the report item collection. |
Property Value
Report The Report |
Methods
AddRange(ReportItemBase[])
Adds an array of report item objects to the collection.
Declaration
public virtual void AddRange(ReportItemBase[] items)
Parameters
Report An array of Report |
Remarks
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
System.
To remove a ReportItemBase that you previously
added, use the
System.
ClearItems()
Declaration
protected override void ClearItems()
Overrides
ContainsKey(String)
Determines whether the ReportItemBase.ItemCollection contains an item with the specified key.
Declaration
public virtual bool ContainsKey(string key)
Parameters
System. The key to locate in the
Report |
Returns
System. true if the ReportItemBase.ItemCollection contains an item with the specified key; otherwise, false. |
Remarks
The Name
property of a Report
Find(String, Boolean)
Searches for report items by their Name property and builds an array of all the report items that match.
Declaration
public virtual ReportItemBase[] Find(string key, bool recursive)
Parameters
System. The key to locate in the
Report |
System. true to search all child report items; otherwise, false. |
Returns
Report An array of type
Report |
Exceptions
System. The key parameter is null or empty. |
Find(Type)
Searches for report items by their Type and builds an array of all the items that match.
Declaration
public virtual ReportItemBase[] Find(Type type)
Parameters
System. The System. |
Returns
Report An array of type
Report |
Find(Type, Boolean)
Searches for report items by their Type and builds an array of all the items that match.
Declaration
public virtual ReportItemBase[] Find(Type type, bool recursive)
Parameters
System. The System. |
System. A value indicating whether to search all children recursively. |
Returns
Report An array of type
Report |
FindItem(Type)
Searches the collection for a report item of the specified type.
Declaration
public virtual ReportItemBase FindItem(Type type)
Parameters
System. The System. |
Returns
Report The first Report |
GetChildIndex(ReportItemBase)
Retrieves the index of a report item within the item collection.
Declaration
public int GetChildIndex(ReportItemBase child)
Parameters
Report The Report |
Returns
System. A zero-based index value that represents the location of the specified child report item within the item collection. |
GetChildIndex(ReportItemBase, Boolean)
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.
Declaration
public virtual int GetChildIndex(ReportItemBase child, bool throwException)
Parameters
Report The Report |
System. true to throw an exception if the ReportItemBase
specified in the child parameter is not an item in the
Report |
Returns
System. 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
Report |
Exceptions
System. The child is not contained in the collection and the throwException parameter is true. |
IndexOfKey(String)
Retrieves the index of the first occurrence of the specified item within the collection.
Declaration
public virtual int IndexOfKey(string key)
Parameters
System. The name of the report item to search for. |
Returns
System. The zero-based index of the first occurrence of the report item with the specified name in the collection. |
Remarks
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 Report
InsertItem(Int32, ReportItemBase)
Overrides the System.Collections.ObjectModel.Collection<T>.InsertItem(System.Int32, T) method.
Declaration
protected override void InsertItem(int index, ReportItemBase item)
Parameters
System. The zero-based index at which to insert value. |
Report
|
Overrides
RemoveByKey(String)
Removes the child report item with the specified key.
Declaration
public virtual void RemoveByKey(string key)
Parameters
System. The name of the child report item to remove. |
Remarks
The Name
property of a Report
RemoveItem(Int32)
Overrides the System.Collections.ObjectModel.Collection<T>.RemoveItem(System.Int32) method.
Declaration
protected override void RemoveItem(int index)
Parameters
System. The zero-based index at which value can be found. |
Overrides
SetItem(Int32, ReportItemBase)
Declaration
protected override void SetItem(int index, ReportItemBase item)
Parameters
System.
|
Report
|