wpf-devexpress-dot-xpf-dot-grid-dot-dataviewbase-faf10685.md
Gets or sets the search string specified within the Search Panel. This is a dependency property.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public string SearchString { get; set; }
Public Property SearchString As String
| Type | Description |
|---|---|
| String |
A String value that specifies the search string.
|
Tip
Topic : Search
A user specifies a search string in the Search Panel‘s edit box. Use the SearchString property to specify a search string in code.
Note
Searches performed with the Search Panel are case-insensitive.
The following code snippets (auto-collected from DevExpress Examples) contain references to the SearchString 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.
protected void CloseExecute() {
this._Grid.View.SearchString = string.Empty;
this.Hide();
wpf-grid-scrollbar-annotations/CS/WpfApplication25/MainWindow.xaml.cs#L53
TableView view = sender as TableView;
view.SearchString = "Element2";
view.SelectCells(15, view.Grid.Columns[0], 25, view.Grid.Columns[1]);
Protected Sub CloseExecute()
_Grid.View.SearchString = String.Empty
Hide()
wpf-grid-scrollbar-annotations/VB/WpfApplication25/MainWindow.xaml.vb#L44
Dim view As DevExpress.Xpf.Grid.TableView = TryCast(sender, DevExpress.Xpf.Grid.TableView)
view.SearchString = "Element2"
view.SelectCells(15, view.Grid.Columns(0), 25, view.Grid.Columns(1))
See Also