windowsforms-4347-controls-and-libraries-data-grid-end-user-capabilities-end-user-capabilities-filter-editor.md
The filter editor is used to edit filter criteria for a grid control. To create and customize filter criteria, use the and buttons embedded into the control and context menus supported by editor elements:.
Remarks
A filter condition group is a set of conditions combined by the same logical operator. The following filter expression contains two groups combined by the logical OR operator: “([Product] = ‘Chang’ And [Quantity] > 20) Or ([Product] In (‘Tofu’, ‘Konbu’) And [Quantity] < 100)”. In the Filter Editor it is represented as follows.
For step-by-step examples of creating filter criteria, see End-User Capabilities: Filter Editor - Building Filter Criteria.
To add a condition to a logical group, do one of the following.
To add a group of conditions to another group, do one of the following.
To add a condition or a group of conditions that have been copied to the Clipboard, press CTRL+V or SHIFT+INSERT. The new condition will be added to the focused group.
To delete a condition, do one of the following.
To delete a group of conditions, do one of the following.
To delete all conditions, do one of the following.
To cut a condition/group of conditions to the Clipboard, focus this condition/the group’s logical operator and press CTRL+X or SHIFT+DELETE.
To copy a condition/group of conditions to the Clipboard, focus this condition/the group’s logical operator and press CTRL+C or CTRL+INSERT.
To cut a condition/group of conditions to the Clipboard, focus this condition/the group’s logical operator and press CTRL+X or SHIFT+DELETE.
To paste a condition/group of conditions from the Clipboard to the focused group, press CTRL+V or SHIFT+INSERT.
To change a condition’s column, invoke the column list by doing one of the following.
Then, choose the required column from the list to be invoked
To change a condition’s operator, invoke the operator list by doing one of the following.
Then, choose the required operator from the list to be invoked
To edit a condition’s value, click the operand value and type text.
To activate the operand value’s edit box without changing the value, click the value or focus the operand value via the keyboard and press F2, SPACE, ENTER or ALT+DOWN
To close the active edit box, press ENTER.
To discard changes to the value and close the active edit box, press ESC.
Do one of the following:
Click the toggle button:
Press CTRL+Q
Then, specify the column via the operand value’s edit box.
Note
This feature is not supported by default. It must be enabled by setting the ColumnViewOptionsFilter.UseNewCustomFilterDialog property to true.
Note
This feature is supported by a limited set of operators: =, <>, >, <, >=, <=. Like, Not Like, Between, Not Between, Any Of and None Of.
To focus a specific filter condition or a group’s operator within the Filter Editor, do one of the following.
To invoke the Filter Editor do one of the following:
Right-click any column’s header and select Filter Editor.
If the filter panel at the bottom of the grid control is visible, click the Edit Filter button.
The Filter Editor is also invoked when choosing the (Custom…) item in a column’s filter dropdown list, if the current filter criteria applied to the column consists of three or more simple filter conditions, or if the filter criteria contain advanced comparison operators such as “Is between” and “Is any of”.
See Also
End-User Capabilities: Filter Editor - Building Filter Criteria