This example demonstrates how to specify the custom compound filter criteria to filter text values in a column.
To apply a custom complex filter, call the AutoFilterColumn.ApplyCustomFilter method overload with five parameters.
Specify the first filter criterion. To perform text filtering, use the wildcard characters. The asterisk * matches any number of characters, while the question mark ? represents a single character. For example, to display all the products that contain the two-letter combination "Gi" in their names, specify the "Gi" string as the filter criterion value, and use the FilterComparisonOperator.Equal member of the FilterComparisonOperator enumeration as the comparison operator.
To filter values containing a specific character, such as the asterisk, question mark or tilde, put the tilde (~) before it.
A complete sample project is available at https://github.com/DevExpress-Examples/spreadsheet-document-server-api-part-2-t217615
Dim worksheet As Worksheet = workbook.Worksheets("Regional sales") workbook.Worksheets.ActiveWorksheet = worksheet ' Enable filtering for the specified cell range. Dim range As Range = worksheet("B2:E23") worksheet.AutoFilter.Apply(range) ' Filter values in the "Product" column that contain "Gi" and include empty cells. Dim products As AutoFilterColumn = worksheet.AutoFilter.Columns(1) products.ApplyCustomFilter("*Gi*", FilterComparisonOperator.Equal, FilterValue.FilterByBlank, FilterComparisonOperator.Equal, False)