windowsforms-16662-controls-and-libraries-tree-list-visual-elements-find-panel.md
The tree list can display a find panel that enables users to search for keywords in visible columns.
Note
Run the XtraTreeList demo to see the find panel in action.
To go to the next result, press one of the following shortcuts:
To go to the previous result, press one of the following shortcuts:
The TreeList.OptionsFind property provides access to options specific to the find panel.
The TreeList.OptionsFind.Behavior property specifies how to show search results:
Filter — hides records that do not match the query and (optionally) highlights results within the tree list.
Search — highlights results in the tree list 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.
To specify whether search queries are highlighted, use the TreeList.OptionsFind.HighlightFindResults property.
After a user types in the search box, the search starts automatically depending on the underlying data source. You can use use the TreeList.OptionsFind.FindMode property to specify this behavior. If the search begins automatically after a query is entered, the TreeList.OptionsFind.FindDelay property specifies the delay before the search is initiated.
Search syntax can vary depending on the TreeList.OptionsFind.ParserKind and TreeList.OptionsFind.Condition properties. See the following help topic for more information: Find Panel Syntax.
If standard search syntax does not fit your needs or you need to highlight search results in a custom manner, you can handle the TreeList.ParseFindPanelText event. The event allows you to create a filter condition based on the query and specify how to highlight results in the control.
The TreeListOptionsFind.ExpandNodesOnSearch property specifies whether to expand tree list nodes if their child nodes contain the search string.
Use the following properties to show/hide buttons.
See Also