Back to Devexpress

DataViewBase.SearchPanelAllowFilter Property

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

latest5.0 KB
Original Source

DataViewBase.SearchPanelAllowFilter Property

Gets or sets whether the grid displays only those records that match the search criteria. This is a dependency property.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public bool SearchPanelAllowFilter { get; set; }
vb
Public Property SearchPanelAllowFilter As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true, to display only those records that match the search criteria; otherwise, false.

|

Remarks

Read Tutorial: Search

You can specify how to display search results:

SearchPanelAllowFilter = true, SearchPanelHighlightResults = true

SearchPanelAllowFilter = false, SearchPanelHighlightResults = true, ScrollBarAnnotationMode = SearchResult

Run Demo: Search Panel - Filter Mode Run Demo: Search Panel - Highlight Mode

The GridControl raises filter events (FilterChanged, FilterGroupSortChanging, and so on) when users search data with the SearchPanelAllowFilter option enabled.

The following code snippets (auto-collected from DevExpress Examples) contain references to the SearchPanelAllowFilter 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.

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

xml
ShowSearchPanelMode="Never"
SearchPanelAllowFilter="False"
ShowTotalSummary="True"/>

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

Enable Search Operations in Detail Grid

DataViewBase Class

DataViewBase Members

DevExpress.Xpf.Grid Namespace