Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Expression Editor
author: Alexey Zolotarev
legacyId: 7430
---
# Expression Editor
The Expression Editor allows you to edit various Boolean or regular expressions in controls:

![UI_Expression_Editor](../../images/img11049.png)

In this editor, you can type an expression manually, or select functions, operators and operands using the editor's controls.

An expression is a string that, when parsed and processed, evaluates some value. Expressions consist of column/field names, constants, operators and functions. Column/field names must be wrapped with brackets. The following are examples of regular expressions:

_"[Quantity] * [UnitPrice] * (1 - [BonusAmount])"_

Boolean expressions:

_"[Country] == 'USA'"_

For more information about syntax you can use in expressions, see [Expression Operators, Functions and Constants](expression-editor/expression-operators-functions-and-constants.md)

The Expression Editor supports numerous standard functions, allowing you to easily perform different string, date-time, logical and math operations over data. You can access the available functions by selecting the **Functions** category.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Filter Editor
author: Alexey Zolotarev
legacyId: 4842
---
# Filter Editor
This section describes the capabilities provided by the Filter Editor, which allows users to visually build filters:

![EndUser_Win_FilterEditor](../../images/img9054.png)

 

Topics in this section:
* [Filter Data via the Filter Editor](filter-editor/filter-data-via-the-filter-editor.md)
* [Examples of Using the Filter Editor](filter-editor/examples-of-using-the-filter-editor.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
title: Examples of Using the Filter Editor
author: Alexey Zolotarev
legacyId: 4661
---
# Examples of Using the Filter Editor
The [Filter Editor](filter-data-via-the-filter-editor.md) allows you to filter data (display those records that meet specific requirements), by visually constructing filter criteria in a straightforward graphical form.

The following sections demonstrate how to construct filter criteria using the Filter Editor.

## How to Construct a Simple Filter Condition
Basically, filter conditions specify what data to select from a data source and display in a data-bound control. A typical simple filter condition consists of three parts: the column/field name, operator and a value(s). For instance, '[Discount] >= 0.05' is a simple filter condition, where '[Discount]' is a field name, '>=' is an operator and '0.05' is a value. This condition when applied to a data-aware control will display records that have values in the Discount column greater than or equal to 0.05. Here is how to create this condition via the Filter Editor (it's assumed that the underlying data source contains the Discount column, otherwise, this column will not be accessible in the Filter Editor's column list):
1. **Invoke the Filter Editor.**

To invoke the Filter Editor in a grid control, right-click any grid column's header and select the Filter Editor option.

![FilterEditor_SimpleCondt_Invoke](../../../images/img7312.png)

To learn how to invoke the Filter Editor for other controls, see corresponding sections in this documentation.

2. **Select a column**.

To filter against the Discount column, click the column name field. This will display the list of available columns. Select the Discount column in this list:

![FilterEditor_SimpleCondt_NewConditionForProductName](../../../images/img7314.png)
3. **Select a comparison operator**.

Click the operator field to choose the required operator.

![FilterEditor_SimpleCondt_SwitchOperators](../../../images/img7316.png)

The comparison operator list displays only those operators that are supported by the current column's data type. For instance, the Discount column is of the numeric type, and the operator list doesn't display the 'Begins with' operator and other operators that are related to strings.
4. **Enter a value**.

Now, click the value box and enter a comparison value ('0.05'):

![FilterEditor_SimpleCondt_EnterValue005](../../../images/img7317.png)
5. **Save changes**.

Click OK or Apply, to filter data using the created filter condition. The grid will show the filter panel displaying the current filter criteria:

![FilterEditor_SimpleCondt_Final](../../../images/img7318.png)

The filter panel will contain the 'Edit Filter' button, which also allows you to invoke the Filter Editor.

## How to Construct Filter Criteria with Multiple Conditions Joined by One Logical Operator
Filter criteria typically consist of two or more simple filter conditions combined by logical operators (AND, OR, NOT AND, NOT OR). The following example shows how to construct filter criteria in the Filter Editor that consist of multiple conditions combined by one logical operator. The "[ProductName] = 'Tofu' AND [Discount] >= 0.1 AND [Quantity] > 99" filter expression contains three simple filter conditions combined by the AND operator. To construct it, do the following:
1. Invoke the Filter Editor. When the Filter Editor is invoked for a grid control, the Filter Editor may display an unfinished new filter condition:

![FilterEditor_3Cond_Invoke](../../../images/img7328.png)
2. Set the condition's operator to Equals and operand value to 'Tofu' (as described in the previous section):

![FilterEditor_3Cond_FirstCondt](../../../images/img7329.png)
3. To add one more condition, press the ![FilterEditor_EU_AddButton](../../../images/img7350.png) button next to the group's AND operator. This will create a new condition under the current one:

![FilterEditor_3Cond_AddSecondCondt](../../../images/img7330.png)




4. For the second condition, set the column to 'Unit Price', operator to '>=' and operand value to '100':

![FilterEditor_3Cond_SecondCondt](../../../images/img7332.png)
5. To add a third condition to the same group, click the ![FilterEditor_EU_AddButton](../../../images/img7350.png) button again. Set the condition's column to 'Units in Stock', operator to '>' and operand value to '50'. Below is the result:

![FilterEditor_3Cond_Final](../../../images/img7327.png)
6. Click OK or Apply, to apply the created filter criteria.

## How to Construct Filter Criteria Involving Different Logical Operators
Some filter criteria contain multiple logical (Boolean) operators combining simple filter conditions. For instance, you want to see items whose price is under 10, and at the same time, the available quantity is also less than 10. At the same time, you may also want to see those items whose price is over 10, while the available quantity is also greater than 10.

The resulting condition will look like this:

``(Price is less than 10 AND Quantity is less than 10) OR (Price is greater than 10 AND Quantity is greater than 10)``

This is how you can do this:
1. Invoke the Filter Editor.
2. Clear existing filter conditions (if any) by clicking the ![FilterEditor_EU_DeleteButton](../../../images/img7351.png) button:

![FilterEditor_4Cond_Clear](../../../images/img7394.png)
3. Change the root logical operator to OR. To do this, click the current AND operator and select OR:

![FilterEditor_4Cond_SelectOR](../../../images/img7396.png)
4. Add a new filter condition group by clicking the OR operator and selecting Add Group.

![FilterEditor_4Cond_Add1CondtGroup](../../../images/img7398.png)
5. For the created condition, set the column to 'UnitPrice', operator to '<' and operand value to '10':

![FilterEditor_4Cond_1CondtGroup_1Condt](../../../images/img7399.png)
6. Click the ![FilterEditor_EU_AddButton](../../../images/img7350.png) button to add a new condition to the current group:

![FilterEditor_4Cond_1CondtGroup_AddNewCondt](../../../images/img7403.png)
7. For the new condition, set the column to 'Quantity', operator to '<' and operand value to '10':

![FilterEditor_4Cond_1CondtGroup_2Condt](../../../images/img7405.png)
8. Add a new filter condition group. To do this, click the root OR operator and select Add Group.

![FilterEditor_4Cond_Add2CondtGroup](../../../images/img7406.png)
9. For the condition within the created group, set the column to 'UnitPrice', operator to '>' and operand value to '10':

![FilterEditor_4Cond_2CondtGroup_1Condt](../../../images/img7407.png)
10. Click the ![FilterEditor_EU_AddButton](../../../images/img7350.png) button to add a new condition to the new group. For the new condition, set the column to 'Quantity', operator to '>' and operand value to '10':

![FilterEditor_4Cond_2CondtGroup_2Condt](../../../images/img7410.png)
12. Click OK or Apply, to apply the created filter criteria.
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: Filter Data via the Filter Editor
author: Alexey Zolotarev
legacyId: 4659
---
# Filter Data via the Filter Editor
## Filter Editor
The **Filter Editor** is used to edit filter criteria. To create and customize filter criteria, use the ![FilterEditor_EU_AddButton](../../../images/img7350.png) and ![FilterEditor_EU_DeleteButton](../../../images/img7351.png) buttons embedded into the control and context menus supported by the editor's elements:

![FilterEditor_Illustration](../../../images/img5357.png)

**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's represented as follows:

![CD_FilterEditor_2Groups](../../../images/img7326.png)

For step-by-step examples of creating filter criteria, see [Examples of Using the Filter Editor](examples-of-using-the-filter-editor.md).

## Add Conditions
To add a condition to a logical group, do one of the following:
* Focus any condition within the group or the group's logical operator and then press INSERT or ADD on the keyboard.
* Click the ![FilterEditor_EU_AddButton](../../../images/img7350.png) button for the group.
* Click the group's logical operator and select **Add Condition**.

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.

## Delete Conditions
To delete a condition, do one of the following:
* Focus the condition and press DELETE or SUBTRACT.
* Click the ![FilterEditor_EU_DeleteButton](../../../images/img7351.png) button.

To delete a group of conditions, do one of the following:
* Focus the group's logical operator and press DELETE or SUBTRACT
* Click the group's logical operator and select **Remove Group**.

To delete all conditions, do one of the following:
* Focus the topmost logical operator and press DELETE or SUBTRACT.
* Click the topmost logical operator and select **Clear All**.

To cut a condition/group of conditions to the clipboard, focus this condition or the group's logical operator and press CTRL+X or SHIFT+DELETE.

## Clipboard Operations
To copy a condition or a group of conditions to the clipboard, focus this condition or the group's logical operator and press CTRL+C or CTRL+INSERT.

To cut a condition or a group of conditions to the clipboard, focus this condition or the group's logical operator and press CTRL+X or SHIFT+DELETE.

To paste a condition or a group of conditions from the clipboard to the focused group, press CTRL+V or SHIFT+INSERT.

## Change a Column in a Filter Condition
To change a condition's column, invoke the column list by doing one of the following:
* Click the current column.
* Focus the current column via the keyboard and press SPACE or ALT+DOWN ARROW.

Then, choose the required column from the list that will be invoked

## Change an Operator in a Filter Condition
To change a condition's operator, invoke the operator list by doing one of the following:
* Click the condition's current operator.
* Focus the current operator via the keyboard and press SPACE or ALT+DOWN ARROW

Then, choose the required operator from the list that will be invoked

## Edit a Condition's Value
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.

## Navigation
To focus a specific filter condition or a group's operator within the Filter Editor, do one of the following:
* Click the target element.
* Use arrow keys to move focus via the keyboard.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading