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

Worksheet collection

Definition

Namespace:Telerik.Web.UI.GridExcelBuilder

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class WorksheetCollection : IWorksheetCollection, IList, ICollection, IEnumerable

Inheritance: objectWorksheetCollection

Implements: ICollectionIEnumerableIListIWorksheetCollection

Inherited Members object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

Default constructor for the WorksheetCollection

C#
public WorksheetCollection()

WorksheetCollection constructor that accepts list of worksheets

C#
public WorksheetCollection(IList list)
Parameters:listIList

IList of worksheet objects

Properties

Gets the number of elements contained in the ICollection. (Inherited from ICollection.)

C#
public virtual int Count { get; }

Gets a value indicating whether the collection has a fixed size.

C#
public virtual bool IsFixedSize { get; }

Gets a value indicating whether the collection is read-only.

C#
public virtual bool IsReadOnly { get; }

Gets a value indicating whether access to the ICollection is synchronized (thread safe). (Inherited from ICollection.)

C#
public virtual bool IsSynchronized { get; }

Gets an object that can be used to synchronize access to the ICollection. (Inherited from ICollection.)

C#
public virtual object SyncRoot { get; }

Gets/sets the Worksheet element residing at the specified position

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

Worksheet index

Property Value:

WorksheetElement object

Implements: IWorksheetCollection.this[int]

Methods

Adds an item to the collection.

C#
public virtual int Add(WorksheetElement value)
Parameters:valueWorksheetElement

The object to add to the collection.

Returns:

int

The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection.

Implements: IWorksheetCollection.Add(WorksheetElement)

Removes all items from the collection.

C#
public virtual void Clear()

Determines whether the collection contains a specific value.

C#
public virtual bool Contains(WorksheetElement value)
Parameters:valueWorksheetElement

The object to locate in the collection.

Returns:

bool

true if the object is found in the collection; otherwise, false.

Implements: IWorksheetCollection.Contains(WorksheetElement)

Copies the elements of the ICollection to an Array, starting at a particular Array index. (Inherited from ICollection.)

C#
public virtual void CopyTo(WorksheetElement[] array, int index)
Parameters:arrayWorksheetElement[]

The one-dimensional Array that is the destination of the elements copied from ICollection. The Array must have zero-based indexing.

indexint

The zero-based index in array at which copying begins.

Implements: IWorksheetCollection.CopyTo(WorksheetElement[], int)

Returns an enumerator that iterates through a collection. (Inherited from IEnumerable.)

C#
public virtual IEnumerator GetEnumerator()
Returns:

IEnumerator

An IEnumerator object that can be used to iterate through the collection.

Determines the index of a specific item in the collection.

C#
public virtual int IndexOf(WorksheetElement value)
Parameters:valueWorksheetElement

The object to locate in the collection.

Returns:

int

The index of value if found in the collection; otherwise, -1.

Implements: IWorksheetCollection.IndexOf(WorksheetElement)

Inserts an item to the collection at the specified index.

C#
public virtual void Insert(int index, WorksheetElement value)
Parameters:indexint

The zero-based index at which value should be inserted.

valueWorksheetElement

The object to insert into the collection.

Implements: IWorksheetCollection.Insert(int, WorksheetElement)

Removes the first occurrence of a specific object from the collection.

C#
public virtual void Remove(WorksheetElement value)
Parameters:valueWorksheetElement

The object to remove from the collection.

Implements: IWorksheetCollection.Remove(WorksheetElement)

Removes the collection item at the specified index.

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

The zero-based index of the item to remove.