New to Telerik UI for .NET MAUIStart a free 30-day trial

A base class that defines common properties, commands, and events for search settings in the RadDataGrid. It also provides the base logic for searching and can be extended when custom search behavior is needed.

Definition

Namespace:Telerik.Maui.Controls.DataGrid

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public abstract class DataGridSearchSettingsBase : BindableObject

Inheritance: objectDataGridSearchSettingsBase

Derived Classes: DataGridSearchSettingsDataGridSemanticSearchSettings

Constructors

C#
protected DataGridSearchSettingsBase()

Fields

ApplyFilterProperty

BindableProperty

Identifies the ApplyFilter property.

C#
public static readonly BindableProperty ApplyFilterProperty

DataGridProperty

BindableProperty

Identifies the DataGrid property.

C#
public static readonly BindableProperty DataGridProperty

Identifies the IntermediateSearchText property.

C#
public static readonly BindableProperty IntermediateSearchTextProperty

Identifies the ProvideSearchMatchesAction property.

C#
public static readonly BindableProperty ProvideSearchMatchesActionProperty

ResultsSummaryProperty

BindableProperty

Identifies the ResultsSummary property.

C#
public static readonly BindableProperty ResultsSummaryProperty

Identifies the SearchMatchesCount property.

C#
public static readonly BindableProperty SearchMatchesCountProperty

SearchTextProperty

BindableProperty

Identifies the SearchText property.

C#
public static readonly BindableProperty SearchTextProperty

SearchTriggerProperty

BindableProperty

Identifies the SearchTrigger property.

C#
public static readonly BindableProperty SearchTriggerProperty

Properties

Gets or sets a value that determines whether business items that do not satisfy the search criteria should be filtered.

C#
public bool ApplyFilter { get; set; }

Gets the corresponding RadDataGrid.

C#
public RadDataGrid DataGrid { get; }

Gets or sets the text of the search entry. Change of this value will not necessarily trigger a search, i.e. it will not necessarily change the SearchText property. The SearchText property is updated in accordance to the SearchTrigger property.

C#
public string IntermediateSearchText { get; set; }

Gets or sets the custom action that is invoked when determining the search matches for a an item. Use this action when you need to specify search matches based on custom logic. See also ProvideSearchMatches(DataGridSearchProbe) which allows to invoke the base logic.

C#
public Action<DataGridSearchProbe> ProvideSearchMatchesAction { get; set; }

Gets a summary of the search results, like the number of search matches. You can override the GetResultsSummary() method when you need to change its value.

C#
public string ResultsSummary { get; }

Gets the number of search matches.

C#
public int SearchMatchesCount { get; }

Gets or sets the search text. Before a search is started, this value is trimmed, and the SearchStarting event is raised and it allows to change the effective search text that will be used for searching.

C#
public string SearchText { get; set; }

Gets or sets a value indicating when a search operation should be performed while the end user is typing in the search entry of the DataGridSearchPanel is raised.

C#
public DataGridSearchTrigger SearchTrigger { get; set; }

Methods

Invoked when updating the ResultsSummary property.

C#
protected virtual string GetResultsSummary()
Returns:

string

Summarized information about the search results in the current search operation.

Invoked when the search results change. You can override this method to add custom logic by either adding or removing search matches. You can also call this method to provide custom search matches.

C#
public virtual void OnSearchResultsChanged(IEnumerable<DataGridSearchResultsItem> searchResults)
Parameters:searchResultsIEnumerable<DataGridSearchResultsItem>

A collection of search results.

Invoked when probing for search matches. You can override this method to add custom logic. For text search probes, use the Matches collection to add or remove matches. For semantic search probes, use IsMatch to indicate whether a cell matches.

C#
protected virtual void ProvideSearchMatches(DataGridSearchProbe probe)
Parameters:probeDataGridSearchProbe

An entity that contains information about the item, such as text of the item, the effective search text, and more.

Events

An event that is raised after a search operation completes and results are available.

C#
public event EventHandler SearchCompleted

An event that is raised before searching starts. The effective search text can be changed and searching can be cancelled from the arguments.

C#
public event EventHandler<DataGridSearchStartingEventArgs> SearchStarting