Skip to main content
A newer version of this page is available. .

Lesson 3 - Data Management

  • 4 minutes to read

This topic covers the basics behind GridControl data management features: sorting, filtering, and grouping.

Sorting

The grid’s data can be sorted by an unlimited number of columns. To sort data against a column or to change a column’s sort order, an end-user can click its header. The column’s current sort order is indicated by the sort glyph (a small arrow displayed at the column header’s right edge).

WPF_Grid_GettingStarted3_Sorting

To clear sorting in a column, your end-users can click the column’s header while pressing the CTRL key. To sort by multiple columns at a time – click the column’s header while pressing the SHIFT key.

You can programmatically sort grid data as it is described in the Sorting documentation section.

Useful links: Sorting | How to: Implement Custom Sorting

Filtering and Searching

Filtering allows you to display a subset of records in the data source that meet the desired criteria. When filtering is applied, only data rows that meet the specified criteria are displayed. Data can be filtered against a single column or multiple columns. End-users can build simple filter criteria and apply them using the Automatic Filter Row, a column’s filter dropdown and the Filter Editor dialog. In addition to filtering, end-users can find specific rows using the built-in search panel.

Filter Dropdown

A filter dropdown displays items that represent unique values within a column. To filter data against a column, an end-user should invoke the column’s filter dropdown list and select any item(s) in this list. This automatically filters data (displays records that have the selected value(s) in the current column).

FilteringOverview

Automatic Filter Row

The automatic filter row allows end-users to filter data on the fly by typing text directly into the row. When an end-user types the text within the row, a filter condition is automatically created based upon the values entered, and applied to the column. By default, the Automatic Filter Row is hidden. To show it, set the TableView.ShowAutoFilterRow property to true.

AutomaticFilterRow

Filter Editor

The grid control ships with a built-in Filter Editor dialog that allows end-users to build filter criteria of any complexity using the tree-like filter builder interface. By default, the Filter Editor displays filter criteria as a tree where individual nodes represent simple filter conditions. The root node is the logical operator combining all conditions. Any filter condition consists of three parts: a column name, criteria operator and operand value. If grid data is not filtered, the editor contains one incomplete filter condition for the clicked column.

WPF_Grid_GettingStarted3_FilterControl

Search Panel

The built-in Search Panel provides an easy way of searching against multiple columns. It is displayed above the Group Panel. The Search Panel contains a search box and control buttons. By default, an end-user can show and hide the Search Panel when required. To display the Search Panel, an end-user should press CTRL+F or select the ‘Show Search Panel’ item of a column’s context menu. To hide the Search Panel, an end-user should do one of the following: click the Close button (if visible), use ESC (the first press clears the search box; the second press closes the Search Panel) or select the ‘Hide Search Panel’ item of a column’s context menu.

Search Panel

Useful links: Filtering and Searching | Search | Filtering: End-User Capabilities

Grouping

The GridControl allows data to be grouped by an unlimited number of columns. When a View is grouped by a single column, data rows that have identical values in this column are arranged into groups. Each group is identified by a group row. If the View is grouped by another column, data rows within each group are arranged into second level groups based on the values of the new grouping column, etc.

GroupRowOverview

Useful links: Grouping | How to: Implement Custom Grouping

Next Steps

Grouping

Filtering and Searching

Sorting

Selection