Back to Devexpress

DataViewBase.ShowSearchPanelMode Property

wpf-devexpress-dot-xpf-dot-grid-dot-dataviewbase-155fd5a3.md

latest7.1 KB
Original Source

DataViewBase.ShowSearchPanelMode Property

Gets or sets a value that specifies when the Search Panel is displayed.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public ShowSearchPanelMode ShowSearchPanelMode { get; set; }
vb
Public Property ShowSearchPanelMode As ShowSearchPanelMode

Property Value

TypeDescription
ShowSearchPanelMode

A ShowSearchPanelMode enumeration member that specifies when the Search Panel is displayed.

|

Available values:

NameDescription
Default

Never if the GridControl is bound to a virtual source; otherwise, HotKey.

| | HotKey |

Ctrl+F - Invokes the Search Panel. Ensure that no cell editor is opened before invoking the Search Panel. Otherwise, the shortcut will be intercepted by the in-place editor.

The Close button (if displayed) hides the Search Panel.

Esc - Clears the search box. If the search box is empty, pressing Esc closes the Search Panel.

| | Always |

The Search Panel is always visible, it cannot be hidden by an end-user. The close button is hidden.

| | Never |

The Search Panel is hidden and cannot be shown by the end-user.

|

Remarks

Tip

Topic : Search

Set the ShowSearchPanelMode property to ShowSearchPanelMode.Always to always display the Search Panel.

Set the ShowSearchPanelMode property to ShowSearchPanelMode.Never to prohibit users from displaying the Search Panel.

Tip

Demos :

To display the Search Panel, a user should do one of the following:

  • Press Ctrl+F.
  • Click the Show Seacrh Panel button ( ).
  • Select the Show Search Panel item in a column’s context menu.

To hide the Search Panel, a user should do one of the following:

  • Press Esc (the first press clears the search box; the second press closes the Search Panel).
  • Click the Close button ( ).
  • Select the Hide Search Panel item in a column’s context menu.

To move focus from the Search Panel to the grid’s data area, a user should press Down Arrow.

To show the MRU search drop-down list, a user should press Alt + Down Arrow.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ShowSearchPanelMode property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-data-grid-bind-to-custom-service-with-restrictions/CS/MainWindow.xaml#L39

xml
<dxg:TableView CompactPanelShowMode="Always" CompactSortElementShowMode="Always"
                   ShowSearchPanelMode="Always" SearchStringToFilterCriteria="OnSearchStringToFilterCriteria" />
</dxg:GridControl.View>

how-to-create-search-window-with-find-previous-and-find-next-buttons-in-gridcontrol-t127527/CS/DevExpress.Example01/MainWindow.xaml#L23

xml
<dxg:TableView AllowPerPixelScrolling="True"
               ShowSearchPanelMode="Never"
               SearchPanelAllowFilter="False"

wpf-grid-scrollbar-annotations/CS/WpfApplication25/MainWindow.xaml#L29

xml
<dxg:GridControl.View>
    <dxg:TableView x:Name="myView" AllowPerPixelScrolling="True" ShowSearchPanelMode="Always" ScrollBarAnnotationMode="{Binding EditValue, ElementName= myListBoxEdit, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay }" ScrollBarCustomRowAnnotation ="MyScrollBarCustomRowAnnotationEventHandler" SearchPanelAllowFilter="False" Loaded="MyLoadedEventHandler">
        <dxg:TableView.FormatConditions>

See Also

ShowSearchPanelCloseButton

ShowSearchPanelFindButton

ShowSearchPanelMRUButton

DataViewBase Class

DataViewBase Members

DevExpress.Xpf.Grid Namespace