Class
FilterBase<T>

Abstract base for filters that evaluate cell properties of type T to determine row visibility; provides property retrieval and copying behavior.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model.Filtering

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Type Parameters:

T

The type of the property definition of the filter.

Syntax:

cs-api-definition
public abstract class FilterBase<T> : IFilter

Inheritance: objectFilterBase<T>

Derived Classes: CellValuesFilterBaseFillColorFilterForeColorFilter

Implements: IFilter

Constructors

FilterBase(int)

Initializes a new instance of the FilterBase<T> class.

Declaration

cs-api-definition
protected FilterBase(int relativeColumnIndex)

Parameters

relativeColumnIndex

int

Index of the relative column.

Properties

PropertyDefinition

Gets the cell property definition specifying which property to retrieve for filter evaluation.

Declaration

cs-api-definition
protected abstract IPropertyDefinition<T> PropertyDefinition { get; }

Property Value

IPropertyDefinition<T>

The property definition.

RelativeColumnIndex

Gets the zero-based column offset within the filter range to which this filter applies.

Declaration

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

Property Value

int

The relative index of the column.

Implements IFilter.RelativeColumnIndex

Methods

GetValue(Cells, int, int)

Retrieves the property value from the cell at the specified row and column, respecting style inheritance.

Declaration

cs-api-definition
public virtual object GetValue(Cells cells, int rowIndex, int columnIndex)

Parameters

cells

Cells

The cells of the worksheet.

rowIndex

int

Index of the row.

columnIndex

int

Index of the column.

Returns

object

The value of the cell.

Implements IFilter.GetValue(Cells, int, int)

ShouldShowValue(object)

Evaluates whether the row containing the specified property value passes the filter criterion and should be visible.

Declaration

cs-api-definition
public abstract bool ShouldShowValue(object value)

Parameters

value

object

The value retrieved by the GetValue method.

Returns

bool

A value indicating whether the row which contains the specified value will be shown

Implements IFilter.ShouldShowValue(object)