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

Search Panel

  • 3 minutes to read

The built-in Search Panel provides an easy way to search against multiple columns.

Search Panel

Tip

Topic: Search

Tip

Demos:

Requires installation of WPF Subscription. Download

The table below lists the main properties affecting element behavior and appearance.

Characteristics

Members

Visibility

DataViewBase.ShowSearchPanelMode - Specifies when the Search Panel is displayed.

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.

DataViewBase.ActualShowSearchPanel - Gets whether the Search Panel is currently visible within a View.

Position

The Search Panel is merged with the Group Panel.

Set the GridViewBase.SearchPanelPosition property to SearchPanelPosition.OverGroupPanel to show the Search Panel over the Group Panel.

Result Info

Set the DataViewBase.ShowSearchPanelResultInfo property to true to show information about search results in the Search Panel.

Searching

DataViewBase.SearchPanelFindMode - Specifies whether a search starts automatically, or must be started manually (by clicking the Find button, pressing ENTER or moving focus from the search panel).

DataViewBase.SearchDelay - Specifies the amount of time in milliseconds after which a data search is initiated (in an automatic find mode).

DataViewBase.SearchPanelCriteriaOperatorType - Specifies the logical operator type (AND or OR). Without quotation marks, words separated by the space character are treated as individual conditions.

DataViewBase.SearchPanelFindFilter - Specifies the type of the comparison operator used to create filter conditions.

Search String

Searches are performed against a string specified by an end-user in a Find Panel’s edit box. To specify a search string in code, use the DataViewBase.SearchString property.

Search Columns

DataViewBase.SearchColumns. By default, this property is set to “*”. In this instance, a search is performed against all visible columns. To search against specific columns, specify the corresponding field names, delimiting them with the “;” character. You can also use the ColumnBase.AllowSearchPanel property to specify whether the column data is taken into account when using the search panel.

Search Results

DataViewBase.SearchPanelHighlightResults - Specifies whether search strings within the located records should be highlighted.

Filtering

DataViewBase.SearchPanelAllowFilter - Specifies whether the grid displays only those records that match the search criteria.

Buttons

DataViewBase.ShowSearchPanelCloseButton, DataViewBase.ShowSearchPanelFindButton, DataViewBase.ShowSearchPanelMRUButton, DataViewBase.ShowSearchPanelNavigationButtons

Null Text

DataViewBase.SearchPanelNullText

Appearance

DataViewBase.SearchPanelHorizontalAlignment

Keyboard Operations

CTRL+F - Invokes the Search Panel (if the DataViewBase.ShowSearchPanelMode property is set to ShowSearchPanelMode.Default).

ESC - Clears the search box. If the search box is empty, pressing ESC closes the Search Panel.

DOWN ARROW - Moves focus from the Search Panel to the grid’s data area.