menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class QueryBuilderColumnValidation - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class QueryBuilderColumnValidation

    Defines and configures the validation rules for a specific column within the Syncfusion.Blazor.QueryBuilder.

    Inheritance
    System.Object
    QueryBuilderColumnValidation
    Namespace: Syncfusion.Blazor.QueryBuilder
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class QueryBuilderColumnValidation : OwningComponentBase
    Remarks

    The QueryBuilderColumnValidation component is used within a QueryBuilderColumn to specify validation criteria, such as whether a value is required or must fall within a specified range.

    Examples

    The following example demonstrates how to apply validation to a column in the Query Builder.

    <SfQueryBuilder>
        <QueryBuilderColumns>
            <QueryBuilderColumn Field="EmployeeID" Label="Employee ID" Type="ColumnType.Number">
                <QueryBuilderColumnValidation IsRequired="true" Min="1000" Max="2000" />
            </QueryBuilderColumn>
        </QueryBuilderColumns>
    </SfQueryBuilder>

    Constructors

    QueryBuilderColumnValidation()

    Declaration
    public QueryBuilderColumnValidation()

    Properties

    IsRequired

    Gets or sets a value indicating whether a value is required for the column.

    Declaration
    public bool IsRequired { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if a value is required; otherwise, false. The default value is false.

    Remarks

    When set to true, the Query Builder will enforce that the user provides a value for this column.

    Max

    Gets or sets the maximum allowed value for a numeric column.

    Declaration
    public int Max { get; set; }
    Property Value
    Type Description
    System.Int32

    An integer representing the maximum value. The default value is 0.

    Remarks

    This property is used for range validation on numeric fields, ensuring that the entered value is not greater than the specified maximum.

    Min

    Gets or sets the minimum allowed value for a numeric column.

    Declaration
    public int Min { get; set; }
    Property Value
    Type Description
    System.Int32

    An integer representing the minimum value. The default value is 0.

    Remarks

    This property is used for range validation on numeric fields, ensuring that the entered value is not less than the specified minimum.

    Methods

    Dispose(Boolean)

    Releases the resources used by the component.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    A boolean value indicating whether the component is currently being disposed.

    OnInitializedAsync()

    Initializes the component and links the validation settings to its parent QueryBuilderColumn.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A System.Threading.Tasks.Task that represents the asynchronous initialization process.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved