alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class FilterRequest

    Represents a filter definition requested by the grid.

    Inheritance
    object
    FilterRequest
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.Grids
    Assembly: Syncfusion.Blazor.Grids.dll
    Syntax
    public class FilterRequest
    Remarks

    Instances of this class are provided through Filter and describe the filtering criteria that should be applied to the data source.

    A filter can represent either a simple condition or a complex condition composed of multiple predicates combined using logical operators such as and and or.

    Constructors

    FilterRequest()

    Declaration
    public FilterRequest()

    Properties

    Condition

    Gets or sets the logical condition used to combine predicates.

    Declaration
    [JsonPropertyName("condition")]
    public string? Condition { get; set; }
    Property Value
    Type Description
    string

    A string representing a logical operator such as and or or, or null when the filter is not a composite expression.

    Field

    Gets or sets the field being filtered.

    Declaration
    [JsonPropertyName("field")]
    public string? Field { get; set; }
    Property Value
    Type Description
    string

    A string representing the field name, or null when not specified.

    IgnoreAccent

    Gets or sets a value indicating whether accented and diacritic characters are ignored during filtering.

    Declaration
    [JsonPropertyName("ignoreAccent")]
    public bool IgnoreAccent { get; set; }
    Property Value
    Type Description
    bool

    true to ignore accent marks; otherwise, false.

    IgnoreCase

    Gets or sets a value indicating whether filtering ignores character casing.

    Declaration
    [JsonPropertyName("ignoreCase")]
    public bool IgnoreCase { get; set; }
    Property Value
    Type Description
    bool

    true to perform case-insensitive filtering; otherwise, false.

    IsComplex

    Gets or sets a value indicating whether this filter contains nested predicates.

    Declaration
    [JsonPropertyName("isComplex")]
    public bool IsComplex { get; set; }
    Property Value
    Type Description
    bool

    true if the filter represents a complex logical expression; otherwise, false.

    Operator

    Gets or sets the filter operator.

    Declaration
    [JsonPropertyName("operator")]
    public string? Operator { get; set; }
    Property Value
    Type Description
    string

    A string representing the comparison operator, or null when not specified.

    Remarks

    Common operators include equal, notequal, contains, startswith, endswith, greaterthan, and lessthan.

    Predicates

    Gets or sets the child predicates that compose a complex filter.

    Declaration
    [JsonPropertyName("predicates")]
    public List<FilterRequest>? Predicates { get; set; }
    Property Value
    Type Description
    List<FilterRequest>

    A List<T> containing nested FilterRequest instances, or null when no child predicates exist.

    Value

    Gets or sets the value used by the filter condition.

    Declaration
    [JsonPropertyName("value")]
    public object? Value { get; set; }
    Property Value
    Type Description
    object

    An object containing the filter value, or null when no value is specified.

    Methods

    And(FilterRequest)

    Combines the current filter with the specified filter using an AND condition.

    Declaration
    public FilterRequest And(FilterRequest predicate)
    Parameters
    Type Name Description
    FilterRequest predicate

    The filter to combine with the current filter.

    Returns
    Type Description
    FilterRequest

    A FilterRequest representing a composite filter that combines both filter expressions using an AND operator.

    Remarks

    The resulting filter has IsComplex set to true.

    And(List<FilterRequest>)

    Creates a composite filter by combining the specified predicates using an AND condition.

    Declaration
    public static FilterRequest And(List<FilterRequest> predicates)
    Parameters
    Type Name Description
    List<FilterRequest> predicates

    The collection of filter predicates to combine.

    Returns
    Type Description
    FilterRequest

    A FilterRequest representing a complex filter containing the specified predicates joined by an AND condition.

    Remarks

    The resulting filter has IsComplex set to true and Condition set to "and".

    And(string, string, object, bool, bool)

    Combines the current filter with a new filter condition using an AND condition.

    Declaration
    public FilterRequest And(string fieldName, string @operator = null, object value = null, bool ignoreCase = false, bool ignoreAccent = false)
    Parameters
    Type Name Description
    string fieldName

    The name of the field to filter.

    string operator

    The comparison operator for the filter condition.

    object value

    The value to compare against.

    bool ignoreCase

    true to perform case-insensitive filtering; otherwise, false.

    bool ignoreAccent

    true to ignore accent and diacritic characters; otherwise, false.

    Returns
    Type Description
    FilterRequest

    A FilterRequest representing a composite filter that combines the current filter and the specified condition using an AND operator.

    Or(FilterRequest)

    Combines the current filter with the specified filter using an OR condition.

    Declaration
    public FilterRequest Or(FilterRequest predicate)
    Parameters
    Type Name Description
    FilterRequest predicate

    The filter to combine with the current filter.

    Returns
    Type Description
    FilterRequest

    A FilterRequest representing a composite filter that combines both filter expressions using an OR operator.

    Remarks

    The resulting filter has IsComplex set to true.

    Or(List<FilterRequest>)

    Creates a composite filter by combining the specified predicates using an OR condition.

    Declaration
    public static FilterRequest Or(List<FilterRequest> predicates)
    Parameters
    Type Name Description
    List<FilterRequest> predicates

    The collection of filter predicates to combine.

    Returns
    Type Description
    FilterRequest

    A FilterRequest representing a complex filter containing the specified predicates joined by an OR condition.

    Remarks

    The resulting filter has IsComplex set to true and Condition set to "or".

    Or(string, string, object, bool, bool)

    Combines the current filter with a new filter condition using an OR condition.

    Declaration
    public FilterRequest Or(string fieldName, string @operator = null, object value = null, bool ignoreCase = false, bool ignoreAccent = false)
    Parameters
    Type Name Description
    string fieldName

    The name of the field to filter.

    string operator

    The comparison operator for the filter condition.

    object value

    The value to compare against.

    bool ignoreCase

    true to perform case-insensitive filtering; otherwise, false.

    bool ignoreAccent

    true to ignore accent and diacritic characters; otherwise, false.

    Returns
    Type Description
    FilterRequest

    A FilterRequest representing a composite filter that combines the current filter and the specified condition using an OR operator.

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