DataViewBase.SearchControl Property

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

Namespace: DevExpress.Xpf.Grid

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

Declaration

[Browsable(false)]
public SearchControl SearchControl { get; set; }
<Browsable(False)>
Public Property SearchControl As SearchControl

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.

If you use a standalone SearchControl associated with a grid, set DataViewBase properties (ShowSearchPanelFindButton, SearchPanelFindMode, etc.) to configure the SearchControl.

Examples

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.

View Example

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