alexa
Syncfusion
menu Syncfusion

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class DataGridSearchController

    Represents the Search operation which is performed in the DataGrid.

    Inheritance
    object
    DataGridSearchController
    Namespace: Syncfusion.Maui.DataGrid
    Assembly: Syncfusion.Maui.DataGrid.dll
    Syntax
    public class DataGridSearchController : BindableObject

    Constructors

    DataGridSearchController(SfDataGrid)

    Invokes when new instances has been created.

    Declaration
    public DataGridSearchController(SfDataGrid sfDataGrid)
    Parameters
    Type Name Description
    SfDataGrid sfDataGrid

    Fields

    AllowCaseSensitiveProperty

    Bindable property for AllowCaseSensitive

    Declaration
    public static readonly BindableProperty AllowCaseSensitiveProperty
    Field Value
    Type
    BindableProperty

    AllowFilteringProperty

    Bindable property for AllowFiltering

    Declaration
    public static readonly BindableProperty AllowFilteringProperty
    Field Value
    Type
    BindableProperty

    CanHighlightSearchTextProperty

    Bindable property for CanHighlightSearchText

    Declaration
    public static readonly BindableProperty CanHighlightSearchTextProperty
    Field Value
    Type
    BindableProperty

    SearchTextProperty

    Bindable property for SearchText

    Declaration
    public static readonly BindableProperty SearchTextProperty
    Field Value
    Type
    BindableProperty

    SearchTypeProperty

    Bindable property for SearchType

    Declaration
    public static readonly BindableProperty SearchTypeProperty
    Field Value
    Type
    BindableProperty

    Properties

    AllowCaseSensitive

    Gets or sets a value that enables case-sensitive string comparison during search in SfDataGrid.

    Declaration
    public bool AllowCaseSensitive { get; set; }
    Property Value
    Type
    bool

    AllowFiltering

    Gets or sets a value that indicates whether to enable filter based on search text.

    Declaration
    public bool AllowFiltering { get; set; }
    Property Value
    Type
    bool

    CanHighlightSearchText

    Gets or sets a value that indicates whether to highlight the search text or not.

    Declaration
    public bool CanHighlightSearchText { get; set; }
    Property Value
    Type
    bool

    CurrentRowColumnIndex

    Gets the RowColumnIndex of the cell that match with search text FindNext or FindPrevious methods are called.

    Declaration
    public RowColumnIndex CurrentRowColumnIndex { get; set; }
    Property Value
    Type
    RowColumnIndex

    SearchText

    Get or set the text used to search the DataGrid.

    Declaration
    public string SearchText { get; set; }
    Property Value
    Type
    string

    SearchType

    Gets or sets the that specifies how to compare cell values with the search text.

    Declaration
    public DataGridSearchType SearchType { get; set; }
    Property Value
    Type
    DataGridSearchType

    Methods

    ApplySpan(DataColumnBase, object, bool)

    Declaration
    protected virtual bool ApplySpan(DataColumnBase column, object data, bool ApplySearchHighlightBrush)
    Parameters
    Type Name Description
    DataColumnBase column
    object data
    bool ApplySearchHighlightBrush
    Returns
    Type
    bool

    ClearSearch()

    Clears the text highlighting in the searched TextBlock’s of SfDataGrid.

    Declaration
    public virtual void ClearSearch()

    ClearSearchCell(DataColumnBase, object)

    Clears highlighting in the specified GridCell.

    Declaration
    protected virtual void ClearSearchCell(DataColumnBase column, object record)
    Parameters
    Type Name Description
    DataColumnBase column

    Denotes the column associated with cell.

    object record

    Denotes the data object associated with cell.

    ClearSearchRow(DataRowBase)

    Clears the highlighting in the searched TextBlock’s of DataRow.

    Declaration
    protected virtual void ClearSearchRow(DataRowBase row)
    Parameters
    Type Name Description
    DataRowBase row

    Specifies the corresponding DataRow.

    FilterRecords(object)

    Returns whether row match with search text to filter SfDataGrid based on search text.

    Declaration
    protected virtual bool FilterRecords(object dataRow)
    Parameters
    Type Name Description
    object dataRow
    Returns
    Type
    bool

    FindNext(string)

    Finds and highlights, the next cell match with search text and updates CurrentRowColumnIndex.

    Declaration
    public virtual bool FindNext(string text)
    Parameters
    Type Name Description
    string text
    Returns
    Type
    bool

    FindPrevious(string)

    Find and highlights, the previous cell match with search text and updates CurrentRowColumnIndex.

    Declaration
    public virtual bool FindPrevious(string text)
    Parameters
    Type Name Description
    string text
    Returns
    Type
    bool

    GetSearchRecords()

    Search and returns the collection of GridSearchInfo.

    Declaration
    public List<DataGridSearchCellInfo>? GetSearchRecords()
    Returns
    Type
    List<DataGridSearchCellInfo>

    MatchSearchText(DataGridColumn, object)

    Checks whether the cell display text with the SearchText.

    Declaration
    protected virtual bool MatchSearchText(DataGridColumn column, object record)
    Parameters
    Type Name Description
    DataGridColumn column

    Denotes the column being searched.

    object record

    Denotes the data object being searched

    Returns
    Type Description
    bool

    Returns true, if cell display text match with search text. Otherwise false.

    OnPropertyChanged(string)

    Declaration
    [UnconditionalSuppressMessage("Trimming", "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", Justification = "The NotifyPropertyChanged method is not trim compatible")]
    protected override void OnPropertyChanged(string propertyName = null)
    Parameters
    Type Name Description
    string propertyName

    Search(string)

    Initiates the Search operation in SfDataGrid based on passed text.

    Declaration
    public virtual void Search(string text)
    Parameters
    Type Name Description
    string text

    Specifies the text to be Search.

    SearchCell(DataColumnBase, object, bool)

    Declaration
    protected virtual bool SearchCell(DataColumnBase column, object record, bool ApplySearchHighlightBrush)
    Parameters
    Type Name Description
    DataColumnBase column
    object record
    bool ApplySearchHighlightBrush
    Returns
    Type
    bool
    Exceptions
    Type Condition
    InvalidOperationException

    SearchRow(DataRowBase)

    Searches the cells in the row to match with the SearchText.

    Declaration
    protected virtual void SearchRow(DataRowBase row)
    Parameters
    Type Name Description
    DataRowBase row

    Specifies the DataRow to search.

    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved