Class FilteredSheetCollection<T>
Provides a type-filtered view over a workbook's sheet collection, exposing only sheets of a specific type.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Spreadsheet.Model
Assembly: Telerik.Windows.Documents.Spreadsheet.dll
Syntax
public abstract class FilteredSheetCollection<T> : IEnumerable<T>, IEnumerable where T : Sheet
Type Parameters
|
T
The type of the sheet. |
Properties
Count
Gets the number of sheets of type T in the collection.
Declaration
public int Count { get; }
Property Value
|
System.Int32
The item count. |
Item[Int32]
Gets the sheet of type T at the specified zero-based index.
Declaration
public T this[int index] { get; }
Parameters
|
System.Int32
index
|
Property Value
|
T
|
Item[String]
Gets the sheet of type T with the specified name (case-insensitive).
Declaration
public T this[string sheetName] { get; }
Parameters
|
System.String
sheetName
|
Property Value
|
T
|
Workbook
Gets the workbook that owns this sheet collection.
Declaration
public Workbook Workbook { get; }
Property Value
|
Workbook
The workbook. |
Methods
Add()
Creates a new sheet of type T and appends it at the end of the collection.
Declaration
public T Add()
Returns
|
T
The created sheet. |
Clear()
Removes all sheets of type T from the collection and workbook.
Declaration
public void Clear()
Contains(T)
Checks whether the specified sheet exists in the collection.
Declaration
public bool Contains(T item)
Parameters
|
T
item
The item. |
Returns
|
System.Boolean
The value indicating whether the collection contains the specified sheet. |
Contains(String)
Checks whether a sheet with the specified name (case-insensitive) exists in the collection.
Declaration
public bool Contains(string sheetName)
Parameters
|
System.String
sheetName
Name of the sheet. |
Returns
|
System.Boolean
The value indicating whether the collection contains a sheet with the specified sheet name. |
GetByName(String)
Retrieves the sheet with the specified name (case-insensitive), or null if not found.
Declaration
public T GetByName(string sheetName)
Parameters
|
System.String
sheetName
Name of the sheet. |
Returns
|
T
The sheet. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<T> GetEnumerator()
Returns
|
System.Collections.Generic.IEnumerator<T>
A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection. |
Implements
Hide(T)
Hides the specified sheet, making it invisible in the workbook.
Declaration
public void Hide(T sheet)
Parameters
|
T
sheet
The sheet. |
Hide(Int32)
Hides the sheet at the specified zero-based index, making it invisible in the workbook.
Declaration
public void Hide(int index)
Parameters
|
System.Int32
index
The index. |
IndexOf(T)
Searches for the specified sheet and returns its zero-based index, or -1 if not found.
Declaration
public int IndexOf(T item)
Parameters
|
T
item
The item. |
Returns
|
System.Int32
The index of the item. |
IndexOf(String)
Searches for a sheet by name (case-insensitive) and returns its zero-based index, or -1 if not found.
Declaration
public int IndexOf(string sheetName)
Parameters
|
System.String
sheetName
Name of the sheet. |
Returns
|
System.Int32
The index of the item |
Insert(Int32)
Creates a new sheet of type T and inserts it at the specified zero-based index.
Declaration
public T Insert(int index)
Parameters
|
System.Int32
index
The index. |
Returns
|
T
The created sheet. |
Remove(T)
Removes the specified sheet from the collection and workbook.
Declaration
public bool Remove(T item)
Parameters
|
T
item
The item. |
Returns
|
System.Boolean
The value indicating whether the specified sheet was found. |
Remove(String)
Removes the sheet with the specified name (case-insensitive) from the collection and workbook.
Declaration
public bool Remove(string sheetName)
Parameters
|
System.String
sheetName
Name of the sheet. |
Returns
|
System.Boolean
The value indicating whether a sheet by the specified name was found. |
RemoveAt(Int32)
Removes the sheet at the specified zero-based index from the collection and workbook.
Declaration
public void RemoveAt(int index)
Parameters
|
System.Int32
index
The index. |
Unhide(T)
Unhides the specified sheet, making it visible in the workbook.
Declaration
public void Unhide(T sheet)
Parameters
|
T
sheet
The sheet. |
Unhide(Int32)
Unhides the sheet at the specified zero-based index, making it visible in the workbook.
Declaration
public void Unhide(int index)
Parameters
|
System.Int32
index
The index. |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
|
System.Collections.IEnumerator
An System.Collections.IEnumerator object that can be used to iterate through the collection. |