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

Find Panel

  • 4 minutes to read

Overview

The grid can display a find panel that enables users to search for keywords in visible columns.

Note

Run the following demo to see the find panel in action: XtraGrid.

Keyboard Operations

Filter and Search Modes

  • Press Ctrl+F to open the find panel;
  • Press Esc once to clear the panel, and press it again to close it;
  • Press the Down Arrow key to move focus from the panel to the grid.

Search Mode Only

  • To go to the next result, press one of the following shortcuts:
    • F3
    • Enter (only if the find panel is focused)
  • To go to the previous result, press one of the following shortcuts:
    • Shift+F3
    • Alt/Ctrl/Shift+Enter (only if the find panel is focused)

Note

A detail view should be maximized to allow its records to be searched.

Tip

Note that GridLookUpEdit does not support the Find Panel. Use SearchLookUpEdit instead.

Options

The ColumnView.OptionsFind property provides access to find panel options.

The ColumnView.OptionsFind.Behavior property specifies how to show search results:

  • Filter — hides records that do not match the query, and (optionally) highlights results in the view.

  • Search — highlights results in the view and on the scrollbar.

If this property is set to Default, the behavior depends on the static (Shared in VB) WindowsFormsSettings.FindPanelBehavior property. If FindPanelBehavior is also set to Default, the Filter mode is applied.

Highlight Results

To specify whether search queries are highlighted, use the ColumnView.OptionsFind.HighlightFindResults property.

Panel Visibility

Panel Location

The GridView.OptionsFind.FindPanelLocation property specifies where the panel is displayed:

The default location depends on the Version Compatibility setting. The find panel is embedded in the group panel as of v19.2.

Specify Search Queries in Code

Search Syntax

Search syntax may vary depending on the GridView.OptionsFind.ParserKind and GridView.OptionsFind.Condition properties. See the following help topic for more information: Find Panel Syntax.

Parse Search Query

If standard search syntax does not fit your needs or you need to highlight search results in a custom manner, you can handle the ColumnView.ParseFindPanelText event. The event allows you to create a filter condition based on the query and specify how to highlight results in the control.

Operation Buttons

Use the following properties to show/hide the operation buttons:

Apply Search Queries

After a user types in the search box, the search starts automatically or manually depending on the underlying data source. You can use use the ColumnView.OptionsFind.FindMode property to specify this behavior explicitly. If the search begins automatically after a query is entered, the ColumnView.OptionsFind.FindDelay property specifies the delay before the search is initiated.

Server Mode Limitations

The find panel has the following limitations in server mode:

See Also