Skip to main content

Search Panel

  • 4 minutes to read

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.

searchpanel

 

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.

Searching

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

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.

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.

Search Results

DataViewBase.SearchPanelHighlightResults - Specifies whether or not 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

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.

#Search Syntax

In its simplest form, a search criteria consist of a single word. To search for a string containing a space character, specify this string in quotation marks. Without quotation marks, words separated by the space character are treated as individual conditions (using the OR logical operator by default). To specify the logical operator, use the DataViewBase.SearchPanelCriteriaOperatorType property.

To search against a specific column, precede a search string with the column's display name plus a colon character.

ColumnDisplayCaption:SearchString

Precede a condition with "+" to select records that match this condition. Other records will be excluded from the result. The "+" specifier allows you to implement the logical AND operator.

Precede a condition with "-" to exclude records that match this condition from the result set.

Examples:

Search Criteria Description
register Selects records that contain the "register" string in any search column.
check register Dave Selects records that contain either "check" or "register" or "Dave" strings in any search column.
"check register" Selects records that contain "check register" in any search column.
screen +"Richard Fisher" Selects records that contain both "screen" and "Richard Fisher" in search columns.
data +entry -mark Selects records that contain both "data" and "entry" in search columns, excluding records that contain "mark".
menu mask -file Selects records that contain "menu" or "mask", excluding records that contain "file".
From:Roller +Subj:"currency mask" Selects records that contain "Roller" in the column that starts with "From", and also contain "currency mask" in the column that starts with "Subj".
import -From:Steve Selects records that contain "import" in any search column, excluding records that contain "Steve" in the column that starts with "From".
NOTE

Searches performed using the Search Panel are case insensitive.