AutoFilter Class

Represents an auto filter applied to a range in a spreadsheet.

Inheritance

Object

Documents.Spreadsheet.AutoFilter

Namespace: Radzen.Documents.Spreadsheet

Assembly: Radzen.Blazor.dll

Syntax

public class AutoFilter

Properties

Rangelink

Gets or sets the range of the filter. Set to null to disable the auto filter.

Declaration
public Documents.Spreadsheet.RangeRef? Range { get; set; }
Property Value
Type Description
Documents.Spreadsheet.RangeRef?Gets or sets the range of the filter. Set to null to disable the auto filter.

Startlink

Gets the first visible cell reference in the range.

Declaration
public Documents.Spreadsheet.CellRef Start { get; }
Property Value
Type Description
Documents.Spreadsheet.CellRefGets the first visible cell reference in the range.

Worksheetlink

Gets the sheet to which the auto filter is applied.

Declaration
public Documents.Spreadsheet.Worksheet Worksheet { get; }
Property Value
Type Description
Documents.Spreadsheet.WorksheetGets the sheet to which the auto filter is applied.

Methods

ApplyColorFilterlink

Filters a column to cells with the matching color.

Declaration
public void ApplyColorFilter(int columnIndex, string color, bool fontColor)
Parameters
Type Name Description
int columnIndex
string color
bool fontColor

ApplyCustomFilterlink

Filters a column using an arbitrary FilterCriterion. The criterion's Column field is overwritten with the absolute column derived from columnIndex.

Declaration
public void ApplyCustomFilter(int columnIndex, Documents.Spreadsheet.FilterCriterion criterion)
Parameters
Type Name Description
int columnIndex
Documents.Spreadsheet.FilterCriterion criterion

ApplyDynamicFilterlink

Filters a column using one of Excel's dynamic predicates.

Declaration
public void ApplyDynamicFilter(int columnIndex, Documents.Spreadsheet.DynamicFilterType type)
Parameters
Type Name Description
int columnIndex
Documents.Spreadsheet.DynamicFilterType type

ApplyTopFilterlink

Filters a column to its top N (or bottom N) items, by count or by percent.

Declaration
public void ApplyTopFilter(int columnIndex, int count, bool percent, bool bottom)
Parameters
Type Name Description
int columnIndex
int count
bool percent
bool bottom

ApplyValueFilterlink

Filters a column to the given list of allowed values. Replaces any existing filter on that column.

Declaration
public void ApplyValueFilter(int columnIndex, IEnumerable<object> values)
Parameters
Type Name Description
int columnIndex
IEnumerable<object> values

ClearColumnFilterlink

Removes any filter applied to columnIndex.

Declaration
public void ClearColumnFilter(int columnIndex)
Parameters
Type Name Description
int columnIndex

GetColumnFilterlink

Returns the filter currently applied to columnIndex, or null.

Declaration
public Documents.Spreadsheet.SheetFilter GetColumnFilter(int columnIndex)
Parameters
Type Name Description
int columnIndex
Returns

ShowAlllink

Clears all filter criteria while keeping the auto filter enabled.

Declaration
public void ShowAll()
An error has occurred. This app may no longer respond until reloaded. Reload 🗙