DataViewBase.SearchControl Property
Gets the search control. This is a dependency property.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v24.2.Core.dll
NuGet Package: DevExpress.Wpf.Grid.Core
Declaration
Property Value
Type | Description |
---|---|
SearchControl | The search control for the GridControl or TreeListControl. |
Remarks
The SearchControl
property returns the GridControl‘s search control and allows you to obtain or specify its properties.
If you use a standalone search control associated with a grid, set DataViewBase properties (ShowSearchPanelFindButton, SearchPanelFindMode, etc.) to configure the search control.
Example
This example shows how to set a custom search control instead of the built-in Search Panel.
<Window x:Class="DXGrid_Custom_SearchControl.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
Title="MainWindow" Height="420" Width="550">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<dxg:GridSearchControl View="{Binding ElementName=view}"/>
<dxg:GridControl Grid.Row="1" AutoGenerateColumns="AddNew">
<dxg:GridControl.View>
<dxg:TableView x:Name="view" ShowSearchPanelMode="Never"/>
</dxg:GridControl.View>
</dxg:GridControl>
</Grid>
</Window>
See Also