[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Collapse]Navigation Controls
   [Collapse]Accordion Control
     Getting Started
    [Expand]Accordion Items
    [Expand]Data Binding
     Expanding and Collapsing
     Searching
     Selection
     View Mode
     Collapse Mode
    [Expand]Visual Elements
    [Expand]Examples
   [Expand]Navigation Bar
    Office Navigation Bar
    TileNav Pane
    Tile Bar
   [Expand]Wizard Control
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Searching

The AccordionControl features a built-in search panel that allows end-users to locate accordion items.

Set the AccordionControl.ShowSearchControl property to true to display the search panel.

This topic contains the following sections:

Expanded Search Tag

Accordion items are filtered based on their AccordionItem.Header property value by default.

You can specify a search tag for an accordion item using the AccordionItem.SearchTag property. An accordion item whose search tag meets the filter criteria is included in the search result regardless of its AccordionItem.Header property value.

The following code sample demonstrates a data editor explicitly wrapped in an AccordionItem object that has a specified search tag:

The image below shows the result:

Note

Only accordion items defined explicitly (not generated from a data source) support search tags.

Expanded Data-Bound Filtering

The data-bound AccordionControl is filtered based on the data source values by default.

Tip

Refer to the Data Binding topic for details on different approaches to binding the AccordionControl to data.

You can use different binding types to specify data source fields the accordion item displays. The following table shows binding types and their matching item rules:

Binding type Matching rule
AccordionControl.DisplayMemberPath An item is included in the result if the underlying data object's displayed value meets the search criteria.
Data template An item is included in the result if the underlying data object's ToString() value meets the search criteria.

Note

The Search Panel feature does not support BindingList.

Expanded Searching Customization

Customize Filter Condition

The AccordionControl uses the Contains filter condition to construct filter criteria by default. Use the AccordionControl.SearchControlFilterCondition property to specify another filter condition:

Customize Filtering Logic

You can handle the AccordionControl.CustomItemFilter event to customize the AccordionControl's filtering logic.

The following code sample shows how to exclude an accordion item from the search result:

The image below shows the result:

Customize Search Panel Text

Use the AccordionControl.SearchControlNullText property to specify a string that the search box displays when it is empty and not focused:

The image below shows the result:

Is this topic helpful?​​​​​​​