Back to Devexpress

DataViewBase.SearchString Property

wpf-devexpress-dot-xpf-dot-grid-dot-dataviewbase-faf10685.md

latest4.2 KB
Original Source

DataViewBase.SearchString Property

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

Declaration

csharp
public string SearchString { get; set; }
vb
Public Property SearchString As String

Property Value

TypeDescription
String

A String value that specifies the search string.

|

Remarks

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.

how-to-create-search-window-with-find-previous-and-find-next-buttons-in-gridcontrol-t127527/CS/DevExpress.Example01/SearchBehavior/SearchWindow.xaml.cs#L180

csharp
protected void CloseExecute() {
    this._Grid.View.SearchString = string.Empty;
    this.Hide();

wpf-grid-scrollbar-annotations/CS/WpfApplication25/MainWindow.xaml.cs#L53

csharp
TableView view = sender as TableView;
view.SearchString = "Element2";
view.SelectCells(15, view.Grid.Columns[0], 25, view.Grid.Columns[1]);

how-to-create-search-window-with-find-previous-and-find-next-buttons-in-gridcontrol-t127527/VB/DevExpress.Example01/SearchBehavior/SearchWindow.xaml.vb#L173

vb
Protected Sub CloseExecute()
    _Grid.View.SearchString = String.Empty
    Hide()

wpf-grid-scrollbar-annotations/VB/WpfApplication25/MainWindow.xaml.vb#L44

vb
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

SearchPanelParseMode

SearchPanelFindFilter

DataViewBase Class

DataViewBase Members

DevExpress.Xpf.Grid Namespace