Skip to content

Commit 7546149

Browse files
authored
Merge pull request #211 from DevExpress/spreadsheet-sort-and-filter-by-color
filter and sort by color spreadsheet
2 parents d361888 + a95c7b9 commit 7546149

File tree

6 files changed

+91
-48
lines changed

6 files changed

+91
-48
lines changed

interface-elements-for-desktop/articles/spreadsheet/data-presentation/filter-data.md

Lines changed: 64 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,86 +4,112 @@ author: Natalya Senichkina
44
legacyId: 17910
55
---
66
# Filter Data
7+
78
The **Spreadsheet** allows you to use the AutoFilter to arrange large amounts of data by displaying only rows that meet the filtering criteria.
89

910
To enable the filtering functionality, select the required data, and on the **Data** tab, in the **Sort & Filter** group, click the **Filter** button.
10-
11+
1112
![Spreadsheet_FilterCommand](../../../images/img25515.png)
1213

1314
Once filtering is activated, a drop-down arrow ![Spreadsheet_FilterAndSortArrow](../../../images/img25500.png) appears on the right side of each column header in the range. Depending on the data in the column you wish to filter, you can apply one of the following filters: Filter by Values, Text Filter, Number Filter or Date Filter.
1415

1516
> [!NOTE]
1617
> You can filter your data by multiple columns. Filters are **additive**: each new filter is applied in addition to the existing filters and further reduces your data.
1718
18-
* [Filter by Values](#filtervalues)
19-
* [Text Filter](#textfilter)
20-
* [Number Filter](#numberfilter)
21-
* [Date and Time Filter](#datefilter)
22-
* [Reapply a Filter](#reapplyfilter)
23-
* [Clear a Filter](#clearfilter)
19+
* [Filter by Values](#filter-by-values)
20+
* [Text Filter](#text-filter)
21+
* [Number Filter](#number-filter)
22+
* [Date and Time Filter](#date-and-time-filter)
23+
* [Reapply a Filter](#reapply-a-filter)
24+
* [Clear a Filter](#clear-a-filter)
25+
26+
## Filter by Values
2427

25-
## <a name="filtervalues"/>Filter by Values
2628
To filter your data by a list of values, do the following.
29+
2730
1. Click the arrow ![Spreadsheet_FilterAndSortArrow](../../../images/img25500.png) in the header of the column containing the values you wish to filter.
2831
2. In the drop-down menu, select the **Filter by Values** item to invoke the **AutoFilter** dialog.
29-
32+
3033
![Spreadsheet_ApplyFilterByValues](../../../images/img25625.png)
3134
3. The **AutoFilter** dialog displays a list of all values in the selected column. Click the **Uncheck All** button to deselect the values. Then, select the check boxes for the items you wish to display, and click **OK**.
32-
35+
3336
![Spreadsheet_AutoFilterDialog](../../../images/img25626.png)
3437

35-
## <a name="textfilter"/>Text Filter
38+
## Text Filter
39+
3640
To apply the text filter, do the following.
41+
3742
1. Click the arrow ![Spreadsheet_FilterAndSortArrow](../../../images/img25500.png) in the header of the column containing text values you wish to filter.
3843
2. Point to **Text Filters** and select one of the built-in comparison operators, or select **Custom Filter** to construct your own filter expression.
39-
44+
4045
![Spreadsheet_ApplyTextFilter](../../../images/img25591.png)
4146
3. In the invoked **Custom AutoFilter** dialog specify the filter criterion.
42-
47+
4348
![Spreadsheet_CustomTextFilter](../../../images/img25592.png)
44-
49+
4550
You can also specify the additional filter criterion using the **AND** or **OR** logical operator to combine the conditions.
46-
47-
To make your filter criterion more flexible, use the **wildcard characters**. The asterisk **&#42;** matches any number of characters, while the question mark **?** represents a single character. For example, to display all the values that start with the letter &quot;**C**&quot;, you can either use the **Begins With** operator as shown in the image above, or select the **Equals** operator and type &quot;**C&#42;**&quot; in the box on the right.
48-
51+
52+
To make your filter criterion more flexible, use the **wildcard characters**. The asterisk **&#42;** matches any number of characters, while the question mark **?** stands for a single character. For example, to display all the values that start with the letter "**C**", you can either use the **Begins With** operator as shown in the image above, or select the **Equals** operator and type "**C&#42;**" in the box on the right.
53+
4954
> [!TIP]
5055
> To filter values containing a specific character, such as the asterisk, question mark or tilde, put the tilde (&#126;) before it.
5156

52-
## <a name="numberfilter"/>Number Filter
57+
## Number Filter
58+
5359
To apply the number filter, do the following.
60+
5461
1. Click the arrow ![Spreadsheet_FilterAndSortArrow](../../../images/img25500.png) in the header of the column containing numeric values you wish to filter.
5562
2. Point to **Number Filters** and select one of the built-in comparison operators (**Equals**, **Greater Than**, **Less Than**, **Between**, **Top 10**, **Above** or **Below Average**, etc.), or select **Custom Filter** to construct your own filter expression.
56-
63+
5764
![Spreadsheet_ApplyNumberFilter](../../../images/img25564.png)
5865
3. In the invoked **Custom AutoFilter** dialog specify the filter criterion.
59-
66+
6067
![Spreadsheet_CustomNumberFilter](../../../images/img25565.png)
61-
68+
6269
You can also specify the additional filter criterion using the **AND** or **OR** logical operator to combine the conditions.
6370

64-
## <a name="datefilter"/>Date and Time Filter
71+
## Date and Time Filter
72+
6573
To apply the date filter, do the following.
74+
6675
1. Click the arrow ![Spreadsheet_FilterAndSortArrow](../../../images/img25500.png) in the header of the column containing dates you wish to filter.
67-
2. Point to **Date Filters** and select one of the built-in dynamic filter types to display dates that fall within a specified time period (next, this or last week, month, year, etc.)...
68-
76+
2. Point to **Date Filters** and select one of the built-in dynamic filter types to display dates that fall within a specified time period (next, this or last week, month, year, etc.).
77+
6978
![Spreadsheet_DynamicDateFilter](../../../images/img25646.png)
70-
71-
... or select the **Before**, **After**, **Equals** or **Between** item to invoke the **Custom AutoFilter** dialog and find dates that are before, after or equal to the specified date, or between two dates.
72-
79+
80+
3. Alternatively, select the **Before**, **After**, **Equals** or **Between** item to invoke the **Custom AutoFilter** dialog. Find dates that are before, after or equal to the specified date, or between two dates.
81+
7382
![Spreadsheet_CustomDateFilter](../../../images/img25635.png)
7483

75-
## <a name="reapplyfilter"/>Reapply a Filter
76-
To reapply a filter after you change your data, click a cell in the range or table to which the filter is applied, and then on the **Data** tab, in the **Sort &#38; Filter** group, click the **Reapply** button.
84+
## Color Filter
85+
86+
If cells in the selected column use different styles, the **Filter by Color** option is available.
87+
88+
1. Click the arrow ![Spreadsheet_FilterAndSortArrow](../../../images/img25500.png) in the header of the column containing dates you wish to filter.
89+
2. Choose **Cell colors…** to apply a background color or pattern filter, and **Font colors…** to apply a font filter.
90+
![Spreadsheet winforms apply color filter](../../../images/spreadsheet_applycolorfilter.png)
91+
3. When you select the required option, a dialog with available colors appears. Select the target color and click **OK**.
92+
![spreadsheet winforms color filter dialog](../../../images/spreadsheetcontrol_filter-color-dialog.png)
93+
94+
## Reapply a Filter
95+
96+
To reapply a filter after you change your data, do the following:
97+
98+
1. Click a cell in the range or table to which the filter is applied.
99+
2. On the **Data** tab, in the **Sort &#38; Filter** group, click the **Reapply** button.
77100

78101
![Spreadsheet_ReapplyFilter](../../../images/img25637.png)
79102

80-
## <a name="clearfilter"/>Clear a Filter
81-
To remove a filter, do the following.
82-
* To remove a filter from a specific column, click the **Filter** button ![Spreadsheet_AppliedFilterIcon](../../../images/img25636.png) in the column header, and then select the **Clear Filter From &#39;Column Name&#39;** item in the drop-down menu.
83-
84-
![Spreadsheet_ClearFilterForColumn](../../../images/img25633.png)
85-
* To clear all the specified filters and display the hidden rows, on the **Data** tab, in the **Sort &#38; Filter** group, click the **Clear** button.
86-
87-
![Spreadsheet_ClearFilterButton](../../../images/img25634.png)
103+
## Clear a Filter
104+
105+
You can remove a filter from a column or remove all filters.
106+
107+
To remove a filter from a specific column, click the **Filter** button ![Spreadsheet_AppliedFilterIcon](../../../images/img25636.png) in the column header, and then select the **Clear Filter From &#39;Column Name&#39;** item in the drop-down menu.
108+
109+
![Spreadsheet_ClearFilterForColumn](../../../images/img25633.png)
110+
111+
To clear all the specified filters and display the hidden rows, on the **Data** tab, in the **Sort &#38; Filter** group, click the **Clear** button.
112+
113+
![Spreadsheet_ClearFilterButton](../../../images/img25634.png)
88114

89-
To disable the filtering functionality, click a cell in the range or table, and then on the **Data** tab, in the **Sort &#38; Filter** group, click the **Filter** button. The drop-down arrows will disappear from the column headers and all the specified filters will be removed.
115+
To disable the filtering functionality, click a cell in the range or table, and then on the **Data** tab, in the **Sort &#38; Filter** group, click the **Filter** button. The drop-down arrows disappear from the column headers and all the specified filters are removed.

interface-elements-for-desktop/articles/spreadsheet/data-presentation/sort-data.md

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,42 @@ author: Natalya Senichkina
44
legacyId: 17911
55
---
66
# Sort Data
7-
The **Spreadsheet** provides the capability to sort data by text (**A to Z** or **Z to A**), numbers (**smallest to largest** or **largest to smallest**), dates and times (**oldest to newest** or **newest to oldest**) in one column.
87

9-
To perform sorting, do the following.
8+
The **Spreadsheet** allows you to sort data by text (**A to Z** or **Z to A**), numbers (**smallest to largest** or **largest to smallest**), dates and times (**oldest to newest** or **newest to oldest**), and color in one column.
9+
10+
To sort data, do the following.
11+
1012
1. Select a range in the column you wish to sort.
11-
12-
> [!NOTE]
13-
> If multiple columns are selected, the range will be sorted by the **first** column.
13+
1414
2. On the **Data** tab, in the **Sort &amp; Filter** group, click **Sort A to Z** to select ascending order, or click **Sort Z to A** for descending order.
15-
16-
![Spreadsheet_SortAtoZ](../../../images/img25488.png)
15+
16+
![Spreadsheet_SortA to Z](../../../images/img25488.png)
17+
18+
> [!NOTE]
19+
> If multiple columns are selected, the range is sorted by the **first** column.
1720
1821
## Sort a Table
22+
1923
To sort data in a table, follow the steps below.
24+
2025
1. Click the arrow ![Spreadsheet_FilterAndSortArrow](../../../images/img25500.png) in the header of the column by which data will be sorted.
2126
2. In the drop-down menu, select the **Sort A to Z** item to select ascending order, or select the **Sort Z to A** item to select descending order.
22-
27+
2328
![Spreadsheet_SortTable](../../../images/img25505.png)
2429

25-
All the records in the table will be reordered accordingly. The tiny arrow ![Spreadsheet_SortedArrow](../../../images/img25503.png) appears in the column header to indicate that data in the table are sorted by this column.
30+
All the records in the table are reordered accordingly. The tiny arrow ![Spreadsheet_SortedArrow](../../../images/img25503.png) appears in the column header to indicate that data in the table are sorted by this column.
2631

2732
> [!NOTE]
28-
> You cannot sort a table by more than one column at a time. When you apply a new sort order, it replaces the previous one.
33+
> You cannot sort a table by more than one column at a time. When you apply a new sort order, it replaces the previous one.
34+
35+
## Sort Data by Color
36+
37+
The **AutoFilter** menu allows a user to sort cells by color. Do the following to sort data by color.
38+
39+
1. Click the arrow ![Spreadsheet_FilterAndSortArrow](../../../images/img25500.png) in the header of the column by which to sort data.
40+
41+
2. Select **Sort by Color**. You can sort data by cell background or font color.
42+
![spreadsheet winforms sort by color](../../../images/spreadsheetcontrol_sort-filter-menu.png)
43+
44+
3. When you select the required sorting option, a dialog with available colors appears. Select the target color and click **OK**.
45+
![spreadsheet winforms sort by color dialog](../../../images/spreadsheetcontrol_sort-color-dialog.png)
130 KB
Loading
12.5 KB
Loading
13.5 KB
Loading
137 KB
Loading

0 commit comments

Comments
 (0)