New to Telerik Document ProcessingStart a free 30-day trial

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:

C#
public abstract class FilterBase<T> : IFilter

Inheritance: objectFilterBase<T>

Derived Classes: CellValuesFilterBaseFillColorFilterForeColorFilter

Implements: IFilter

Constructors

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

C#
protected FilterBase(int relativeColumnIndex)
Parameters:relativeColumnIndexint

Index of the relative column.

Methods

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

C#
public virtual object GetValue(Cells cells, int rowIndex, int columnIndex)
Parameters:cellsCells

The cells of the worksheet.

rowIndexint

Index of the row.

columnIndexint

Index of the column.

Returns:

object

The value of the cell.

Implements: IFilter.GetValue(Cells, int, int)

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

C#
public abstract bool ShouldShowValue(object value)
Parameters:valueobject

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)

Properties

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

C#
protected abstract IPropertyDefinition<T> PropertyDefinition { get; }
Property Value:

The property definition.

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

C#
public int RelativeColumnIndex { get; }
Property Value:

The relative index of the column.

Implements: IFilter.RelativeColumnIndex