ClassFilteredSheetCollection<T>
Provides a type-filtered view over a workbook's sheet collection, exposing only sheets of a specific type.
Definition
Namespace:Telerik.Windows.Documents.Spreadsheet.Model
Assembly:Telerik.Windows.Documents.Spreadsheet.dll
Type Parameters:
T
The type of the sheet.
Syntax:
public abstract class FilteredSheetCollection<T> : IEnumerable<T>, IEnumerable where T : Sheet
Inheritance: objectFilteredSheetCollection<T>
Derived Classes:
Implements:
Properties
Count
Gets the number of sheets of type T in the collection.
Workbook
Gets the workbook that owns this sheet collection.
Declaration
public Workbook Workbook { get; }
Property Value
The workbook.
this[int]
Gets the sheet of type T at the specified zero-based index.
Declaration
public T this[int index] { get; }
Parameters
index
Property Value
T
this[string]
Gets the sheet of type T with the specified name (case-insensitive).
Declaration
public T this[string sheetName] { get; }
Parameters
sheetName
Property Value
T
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
item
T
The item.
Returns
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.
GetByName(string)
Retrieves the sheet with the specified name (case-insensitive), or null if not found.
Declaration
public T GetByName(string sheetName)
Parameters
sheetName
Name of the sheet.
Returns
T
The sheet.
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<T> GetEnumerator()
Returns
IEnumerator<T>
A 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
sheet
T
The sheet.
Hide(int)
Hides the sheet at the specified zero-based index, making it invisible in the workbook.
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
item
T
The item.
Returns
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.
Insert(int)
Creates a new sheet of type T and inserts it at the specified zero-based index.
Declaration
public T Insert(int index)
Parameters
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
item
T
The item.
Returns
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.
RemoveAt(int)
Removes the sheet at the specified zero-based index from the collection and workbook.
Unhide(T)
Unhides the specified sheet, making it visible in the workbook.
Declaration
public void Unhide(T sheet)
Parameters
sheet
T
The sheet.
Unhide(int)
Unhides the sheet at the specified zero-based index, making it visible in the workbook.