- 3 minutes to read
The built-in Search Panel provides an easy way to search against multiple columns.
Requires installation of WPF Subscription. Download
The table below lists the main properties affecting element behavior and appearance.
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.
The Search Panel is merged with the Group Panel.
Set the DataViewBase.ShowSearchPanelResultInfo property to true to show information about search results in the Search Panel.
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.
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.
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.
DataViewBase.SearchPanelHighlightResults - Specifies whether search strings within the located records should be highlighted.
DataViewBase.SearchPanelAllowFilter - Specifies whether the grid displays only those records that match the search criteria.
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.