Class
TopFilter

Filter that displays only the top or bottom N items or percentage of items by numeric value in a column.

Definition

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

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public class TopFilter : CellValuesFilterBase, IFilter

Inheritance: objectFilterBase<ICellValue>CellValuesFilterBaseTopFilter

Implements: IFilter

Inherited Members CellValuesFilterBase.PropertyDefinitionFilterBase<ICellValue>.GetValue(Cells, int, int)FilterBase<ICellValue>.RelativeColumnIndex

Constructors

TopFilter(int)

Initializes a new top filter showing the top 10 numeric values by default.

Declaration

cs-api-definition
public TopFilter(int relativeColumnIndex)

Parameters

relativeColumnIndex

int

The relative index of the column.

TopFilter(int, TopFilterType, double)

Initializes a new top filter with the specified filter type and count or percentage threshold.

Declaration

cs-api-definition
public TopFilter(int relativeColumnIndex, TopFilterType topFilterType, double value)

Parameters

relativeColumnIndex

int

The relative index of the column.

topFilterType

TopFilterType

Type of the top filter.

value

double

Gets the value which indicates how many or what percent of the items covered by the filter should be shown.

Properties

TopFilterType

Filter type controlling whether to show top or bottom items by count or percentage.

Declaration

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

Property Value

TopFilterType

The type of the top filter.

Value

Number of items or percentage (depending on filter type) to display from the sorted column values.

Declaration

cs-api-definition
public double Value { get; }

Property Value

double

The value.

Methods

Equals(object)

Determines whether the specified object is equal to the current object.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Overrides object.Equals(object)

GetHashCode()

Serves as a hash function for a particular type.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

Overrides object.GetHashCode()

ShouldShowValue(object)

Evaluates whether the numeric value ranks within the configured top or bottom threshold.

Declaration

cs-api-definition
public override 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

Overrides FilterBase<ICellValue>.ShouldShowValue(object)