Class
ValuesCollectionFilter

Filter that displays rows whose cell values match any value in a predefined list of strings, dates, or blank entries.

Definition

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

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

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

Inheritance: objectFilterBase<ICellValue>CellValuesFilterBaseValuesCollectionFilter

Implements: IFilter

Inherited Members CellValuesFilterBase.PropertyDefinitionFilterBase<ICellValue>.RelativeColumnIndex

Constructors

ValuesCollectionFilter(int, IEnumerable<DateGroupItem>)

Initializes a values filter matching the specified date group items, excluding blanks.

Declaration

cs-api-definition
public ValuesCollectionFilter(int relativeColumnIndex, IEnumerable<DateGroupItem> dateValues)

Parameters

relativeColumnIndex

int

Relative index of the column.

dateValues

IEnumerable<DateGroupItem>

The date values.

ValuesCollectionFilter(int, IEnumerable<DateGroupItem>, bool)

Initializes a values filter matching the specified date group items with optional blank inclusion.

Declaration

cs-api-definition
public ValuesCollectionFilter(int relativeColumnIndex, IEnumerable<DateGroupItem> dateValues, bool blank)

Parameters

relativeColumnIndex

int

Relative index of the column.

dateValues

IEnumerable<DateGroupItem>

The date values.

blank

bool

The value indicating whether the cells containing blank values should be shown by the filter.

ValuesCollectionFilter(int, IEnumerable<string>)

Initializes a values filter matching the specified string values, excluding blanks.

Declaration

cs-api-definition
public ValuesCollectionFilter(int relativeColumnIndex, IEnumerable<string> stringValues)

Parameters

relativeColumnIndex

int

Relative index of the column.

stringValues

IEnumerable<string>

The string values.

ValuesCollectionFilter(int, IEnumerable<string>, IEnumerable<DateGroupItem>)

Initializes a values filter matching both string and date group items, excluding blanks.

Declaration

cs-api-definition
public ValuesCollectionFilter(int relativeColumnIndex, IEnumerable<string> stringValues, IEnumerable<DateGroupItem> dateValues)

Parameters

relativeColumnIndex

int

Relative index of the column.

stringValues

IEnumerable<string>

The string values.

dateValues

IEnumerable<DateGroupItem>

The date values.

ValuesCollectionFilter(int, IEnumerable<string>, IEnumerable<DateGroupItem>, bool)

Initializes a values filter matching string values, date group items, and optionally blank cells.

Declaration

cs-api-definition
public ValuesCollectionFilter(int relativeColumnIndex, IEnumerable<string> stringValues, IEnumerable<DateGroupItem> dateValues, bool blank)

Parameters

relativeColumnIndex

int

Relative index of the column.

stringValues

IEnumerable<string>

The string values.

dateValues

IEnumerable<DateGroupItem>

The date values.

blank

bool

The value indicating whether the cells containing blank values should be shown by the filter.

ValuesCollectionFilter(int, IEnumerable<string>, bool)

Initializes a values filter matching the specified string values with optional blank inclusion.

Declaration

cs-api-definition
public ValuesCollectionFilter(int relativeColumnIndex, IEnumerable<string> stringValues, bool blank)

Parameters

relativeColumnIndex

int

Relative index of the column.

stringValues

IEnumerable<string>

The string values.

blank

bool

The value indicating whether the cells containing blank values should be shown by the filter.

Properties

Blank

Whether to include rows with empty or whitespace-only cell values in the filtered results.

Declaration

cs-api-definition
public bool Blank { get; }

Property Value

bool

The value indicating whether the cells containing blank values should be shown by the filter.

DateItems

Date group items representing hierarchical date/time criteria (year, month, day) for filtering date-formatted cells.

Declaration

cs-api-definition
public IEnumerable<DateGroupItem> DateItems { get; }

Property Value

IEnumerable<DateGroupItem>

The date items.

StringValues

Text values to match against formatted cell content; matching is case-insensitive.

Declaration

cs-api-definition
public IEnumerable<string> StringValues { get; }

Property Value

IEnumerable<string>

The string values.

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()

GetValue(Cells, int, int)

Retrieves the cell value formatted as a string or DateTime based on the cell's number format for filter comparison.

Declaration

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

Overrides FilterBase<ICellValue>.GetValue(Cells, int, int)

ShouldShowValue(object)

Evaluates whether the value matches any entry in the string list, date groups, or blank criteria.

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)