Skip to main content
.NET Framework 4.5.2+
Row

AutoFilterColumn.ApplyDynamicFilter(DynamicFilterType) Method

Applies a dynamic filter that shows dates that fall within a specified time period or displays values that are above or below the average.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v22.2.Core.dll

Declaration

void ApplyDynamicFilter(
    DynamicFilterType dynamicFilterType
)

Parameters

Name Type Description
dynamicFilterType DynamicFilterType

A DynamicFilterType enumeration member that specifies the filter criterion.

Remarks

The dynamic filter can change when the data to which the filter is applied or the current system date changes.

Example

View Example

Worksheet worksheet = workbook.Worksheets["Regional sales"];
workbook.Worksheets.ActiveWorksheet = worksheet;

// Enable filtering for the specified cell range.
CellRange range = worksheet["B2:E23"];
worksheet.AutoFilter.Apply(range);

// Apply a dynamic filter to the "Sales" column to display only values that are above the average.
worksheet.AutoFilter.Columns[2].ApplyDynamicFilter(DynamicFilterType.AboveAverage);
// Apply a dynamic filter to the "Reported Date" column to display values reported this year.
worksheet.AutoFilter.Columns[3].ApplyDynamicFilter(DynamicFilterType.ThisYear);

The following code snippets (auto-collected from DevExpress Examples) contain references to the ApplyDynamicFilter(DynamicFilterType) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also