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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

Removes any filter applied to columnIndex.

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

GetColumnFilterLink to this section

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 to this section

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 🗙