Class ValuesCollectionFilter
Filter that displays rows whose cell values match any value in a predefined list of strings, dates, or blank entries.
Inherited Members
Namespace: Telerik.Windows.Documents.Spreadsheet.Model.Filtering
Assembly: Telerik.Windows.Documents.Spreadsheet.dll
Syntax
public class ValuesCollectionFilter : CellValuesFilterBase, IFilter, ITranslatable, ICopyable<IFilter>
Constructors
ValuesCollectionFilter(Int32, IEnumerable<String>)
Initializes a values filter matching the specified string values, excluding blanks.
Declaration
public ValuesCollectionFilter(int relativeColumnIndex, IEnumerable<string> stringValues)
Parameters
|
System.Int32
relativeColumnIndex
Relative index of the column. |
|
System.Collections.Generic.IEnumerable<System.String>
stringValues
The string values. |
ValuesCollectionFilter(Int32, IEnumerable<String>, Boolean)
Initializes a values filter matching the specified string values with optional blank inclusion.
Declaration
public ValuesCollectionFilter(int relativeColumnIndex, IEnumerable<string> stringValues, bool blank)
Parameters
|
System.Int32
relativeColumnIndex
Relative index of the column. |
|
System.Collections.Generic.IEnumerable<System.String>
stringValues
The string values. |
|
System.Boolean
blank
The value indicating whether the cells containing blank values should be shown by the filter. |
ValuesCollectionFilter(Int32, IEnumerable<String>, IEnumerable<DateGroupItem>)
Initializes a values filter matching both string and date group items, excluding blanks.
Declaration
public ValuesCollectionFilter(int relativeColumnIndex, IEnumerable<string> stringValues, IEnumerable<DateGroupItem> dateValues)
Parameters
|
System.Int32
relativeColumnIndex
Relative index of the column. |
|
System.Collections.Generic.IEnumerable<System.String>
stringValues
The string values. |
|
System.Collections.Generic.IEnumerable<DateGroupItem>
dateValues
The date values. |
ValuesCollectionFilter(Int32, IEnumerable<String>, IEnumerable<DateGroupItem>, Boolean)
Initializes a values filter matching string values, date group items, and optionally blank cells.
Declaration
public ValuesCollectionFilter(int relativeColumnIndex, IEnumerable<string> stringValues, IEnumerable<DateGroupItem> dateValues, bool blank)
Parameters
|
System.Int32
relativeColumnIndex
Relative index of the column. |
|
System.Collections.Generic.IEnumerable<System.String>
stringValues
The string values. |
|
System.Collections.Generic.IEnumerable<DateGroupItem>
dateValues
The date values. |
|
System.Boolean
blank
The value indicating whether the cells containing blank values should be shown by the filter. |
ValuesCollectionFilter(Int32, IEnumerable<DateGroupItem>)
Initializes a values filter matching the specified date group items, excluding blanks.
Declaration
public ValuesCollectionFilter(int relativeColumnIndex, IEnumerable<DateGroupItem> dateValues)
Parameters
|
System.Int32
relativeColumnIndex
Relative index of the column. |
|
System.Collections.Generic.IEnumerable<DateGroupItem>
dateValues
The date values. |
ValuesCollectionFilter(Int32, IEnumerable<DateGroupItem>, Boolean)
Initializes a values filter matching the specified date group items with optional blank inclusion.
Declaration
public ValuesCollectionFilter(int relativeColumnIndex, IEnumerable<DateGroupItem> dateValues, bool blank)
Parameters
|
System.Int32
relativeColumnIndex
Relative index of the column. |
|
System.Collections.Generic.IEnumerable<DateGroupItem>
dateValues
The date values. |
|
System.Boolean
blank
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
public bool Blank { get; }
Property Value
|
System.Boolean
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
public IEnumerable<DateGroupItem> DateItems { get; }
Property Value
|
System.Collections.Generic.IEnumerable<DateGroupItem>
The date items. |
StringValues
Text values to match against formatted cell content; matching is case-insensitive.
Declaration
public IEnumerable<string> StringValues { get; }
Property Value
|
System.Collections.Generic.IEnumerable<System.String>
The string values. |
Methods
Equals(Object)
Determines whether the specified System.Object is equal to the current System.Object.
Declaration
public override bool Equals(object obj)
Parameters
|
System.Object
obj
The System.Object to compare with the current System.Object. |
Returns
|
System.Boolean
true if the specified System.Object is equal to the current System.Object; otherwise, false. |
Overrides
GetHashCode()
Serves as a hash function for a particular type.
Declaration
public override int GetHashCode()
Returns
|
System.Int32
A hash code for the current System.Object. |
Overrides
GetValue(Cells, Int32, Int32)
Retrieves the cell value formatted as a string or DateTime based on the cell's number format for filter comparison.
Declaration
public override object GetValue(Cells cells, int rowIndex, int columnIndex)
Parameters
|
Cells
cells
The cells of the worksheet. |
|
System.Int32
rowIndex
Index of the row. |
|
System.Int32
columnIndex
Index of the column. |
Returns
|
System.Object
The value of the cell. |
Overrides
ShouldShowValue(Object)
Evaluates whether the value matches any entry in the string list, date groups, or blank criteria.
Declaration
public override bool ShouldShowValue(object value)
Parameters
|
System.Object
value
The value retrieved by the GetValue method. |
Returns
|
System.Boolean
A value indicating whether the row which contains the specified value will be shown |