Skip to main content
A newer version of this page is available. .

DataViewBase.SearchControl Property

Gets or sets the search control. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

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

Declaration

[Browsable(false)]
public SearchControl SearchControl { get; set; }

Property Value

Type Description
SearchControl

An object that represents the search control for the GridControl or TreeListControl.

Remarks

Handle the SearchControl property to set a custom SearchControl instead of the built-in Search Panel to provide the Grid with the ability to search against multiple columns.

Example

This example shows how to set a custom SearchControl instead of the built-in Search Panel to provide the Grid with the ability to search against multiple columns.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace DXGrid_Custom_SearchControl {
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window {
        public MainWindow() {
            InitializeComponent();
            gridControl1.ItemsSource = new nwindDataSetTableAdapters.CustomersTableAdapter().GetData();
        }
    }
}
See Also