Class
FilteredSheetCollection<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:

cs-api-definition
public abstract class FilteredSheetCollection<T> : IEnumerable<T>, IEnumerable where T : Sheet

Inheritance: objectFilteredSheetCollection<T>

Derived Classes: WorksheetCollection

Implements: IEnumerableIEnumerable<T>

Properties

Count

Gets the number of sheets of type T in the collection.

Declaration

cs-api-definition
public int Count { get; }

Property Value

int

The item count.

Workbook

Gets the workbook that owns this sheet collection.

Declaration

cs-api-definition
public Workbook Workbook { get; }

Property Value

Workbook

The workbook.

this[int]

Gets the sheet of type T at the specified zero-based index.

Declaration

cs-api-definition
public T this[int index] { get; }

Parameters

index

int

Property Value

T

this[string]

Gets the sheet of type T with the specified name (case-insensitive).

Declaration

cs-api-definition
public T this[string sheetName] { get; }

Parameters

sheetName

string

Property Value

T

Methods

Add()

Creates a new sheet of type T and appends it at the end of the collection.

Declaration

cs-api-definition
public T Add()

Returns

T

The created sheet.

Clear()

Removes all sheets of type T from the collection and workbook.

Declaration

cs-api-definition
public void Clear()

Contains(T)

Checks whether the specified sheet exists in the collection.

Declaration

cs-api-definition
public bool Contains(T item)

Parameters

item

T

The item.

Returns

bool

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

cs-api-definition
public bool Contains(string sheetName)

Parameters

sheetName

string

Name of the sheet.

Returns

bool

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

cs-api-definition
public T GetByName(string sheetName)

Parameters

sheetName

string

Name of the sheet.

Returns

T

The sheet.

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration

cs-api-definition
public IEnumerator<T> GetEnumerator()

Returns

IEnumerator<T>

A IEnumerator<T> that can be used to iterate through the collection.

Implements IEnumerable<T>.GetEnumerator()

Hide(T)

Hides the specified sheet, making it invisible in the workbook.

Declaration

cs-api-definition
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.

Declaration

cs-api-definition
public void Hide(int index)

Parameters

index

int

The index.

IndexOf(T)

Searches for the specified sheet and returns its zero-based index, or -1 if not found.

Declaration

cs-api-definition
public int IndexOf(T item)

Parameters

item

T

The item.

Returns

int

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

cs-api-definition
public int IndexOf(string sheetName)

Parameters

sheetName

string

Name of the sheet.

Returns

int

The index of the item

Insert(int)

Creates a new sheet of type T and inserts it at the specified zero-based index.

Declaration

cs-api-definition
public T Insert(int index)

Parameters

index

int

The index.

Returns

T

The created sheet.

Remove(T)

Removes the specified sheet from the collection and workbook.

Declaration

cs-api-definition
public bool Remove(T item)

Parameters

item

T

The item.

Returns

bool

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

cs-api-definition
public bool Remove(string sheetName)

Parameters

sheetName

string

Name of the sheet.

Returns

bool

The value indicating whether a sheet by the specified name was found.

RemoveAt(int)

Removes the sheet at the specified zero-based index from the collection and workbook.

Declaration

cs-api-definition
public void RemoveAt(int index)

Parameters

index

int

The index.

Unhide(T)

Unhides the specified sheet, making it visible in the workbook.

Declaration

cs-api-definition
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.

Declaration

cs-api-definition
public void Unhide(int index)

Parameters

index

int

The index.