Back to Devexpress

AutoFilterColumn.ApplyCustomFilter(FilterValue, FilterComparisonOperator) Method

officefileapi-devexpress-dot-spreadsheet-dot-autofiltercolumn-dot-applycustomfilter-x28-devexpress-dot-spreadsheet-dot-filtervalue-devexpress-dot-spreadsheet-dot-filtercomparisonoperator-x29.md

latest5.5 KB
Original Source

AutoFilterColumn.ApplyCustomFilter(FilterValue, FilterComparisonOperator) Method

Applies a custom filter based on the specified filter value and comparison operator.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
void ApplyCustomFilter(
    FilterValue criteria,
    FilterComparisonOperator criteriaOperator
)
vb
Sub ApplyCustomFilter(
    criteria As FilterValue,
    criteriaOperator As FilterComparisonOperator
)

Parameters

NameTypeDescription
criteriaFilterValue

A FilterValue object that specifies the filter criterion value.

| | criteriaOperator | FilterComparisonOperator |

One of the FilterComparisonOperator enumeration members that defines the comparison operator used to construct the filter expression.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the ApplyCustomFilter(FilterValue, FilterComparisonOperator) 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.

winforms-spreadsheetcontrol-api-part-2/CS/SpreadsheetControl_API_Part02/SpreadsheetActions/AutoFilterActions.cs#L379

csharp
// Filter values in the "Sales" column that are greater than 5000$.
worksheet.AutoFilter.Columns[2].ApplyCustomFilter(5000, FilterComparisonOperator.GreaterThan);

wpf-spreadsheetcontrol-api-part-2/CS/SpreadsheetControl_WPF_API_Part02/SpreadsheetActions/AutoFilterActions.cs#L380

csharp
// Filter values in the "Sales" column that are greater than 5000$.
worksheet.AutoFilter.Columns[2].ApplyCustomFilter(5000, FilterComparisonOperator.GreaterThan);

spreadsheet-document-api-examples-part2/CS/SpreadsheetDocServerAPIPart2/CodeExamples/AutoFilterActions.cs#L291

csharp
// Filter values in the "Sales" column that are greater than 5000$.
worksheet.AutoFilter.Columns[2].ApplyCustomFilter(5000, FilterComparisonOperator.GreaterThan);

winforms-spreadsheetcontrol-api-part-2/VB/SpreadsheetControl_API_Part02/SpreadsheetActions/AutoFilterActions.vb#L266

vb
' Filter values in the "Sales" column that are greater than 5000$.
worksheet.AutoFilter.Columns(2).ApplyCustomFilter(5000, FilterComparisonOperator.GreaterThan)

wpf-spreadsheetcontrol-api-part-2/VB/SpreadsheetControl_WPF_API_Part02/SpreadsheetActions/AutoFilterActions.vb#L265

vb
' Filter values in the "Sales" column that are greater than 5000$.
worksheet.AutoFilter.Columns(2).ApplyCustomFilter(5000, FilterComparisonOperator.GreaterThan)

spreadsheet-document-api-examples-part2/VB/SpreadsheetDocServerAPIPart2/CodeExamples/AutoFilterActions.vb#L271

vb
' Filter values in the "Sales" column that are greater than 5000$.
worksheet.AutoFilter.Columns(2).ApplyCustomFilter(5000, FilterComparisonOperator.GreaterThan)

See Also

WinForms Spreadsheet Control Examples

AutoFilterColumn Interface

AutoFilterColumn Members

DevExpress.Spreadsheet Namespace