DataViewBase.SearchPanelFindFilter Property
Gets or sets the type of the comparison operator used to create filter conditions. This is a dependency property.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v24.2.Core.dll
NuGet Package: DevExpress.Wpf.Grid.Core
#Declaration
public FilterCondition SearchPanelFindFilter { get; set; }
#Property Value
Type | Default | Description |
---|---|---|
Filter |
Contains | One of the Filter |
Available values:
Name | Description |
---|---|
Contains | Specifies the Contains comparison operation. |
Starts |
Specifies the Starts |
Like | Specifies the Like comparison operation. |
Default | Specifies the default comparison operation. |
Equals | Specifies the Equals comparison operation. |
#Remarks
Tip
Topic: Search
Use the SearchPanelFindFilter property to specify the comparison operator type: Contains (Default), Equals, Like, or StartsWith.
Note
In Like mode, the % symbol means zero, single, or multiple characters. In the Contains, Equals, and Starts
#Example
This code snippet demonstrates how to change the Search Panel’s comparison operator type at runtime.
using System.Windows;
using System.Collections.ObjectModel;
using DevExpress.Mvvm.DataAnnotations;
namespace DXGridSample {
public partial class MainWindow : Window {
public MainWindow() {
InitializeComponent();
}
}
[POCOViewModel]
public class MainViewModel {
public virtual ObservableCollection<Item> Items { get; set; }
public MainViewModel() {
Items = new ObservableCollection<Item>();
for (int i = 0; i < 100; i++)
Items.Add(new Item { Id = i, Name = "Name" + i });
}
}
public class Item {
public int Id { get; set; }
public string Name { get; set; }
}
}
The image below illustrates the result: