Class QueryBuilderEvents<TValue>
Configures the event handlers for the SfQueryBuilder<TValue>.
Inheritance
Namespace: Syncfusion.Blazor.QueryBuilder
Assembly: Syncfusion.Blazor.dll
Syntax
public class QueryBuilderEvents<TValue> : OwningComponentBase
Type Parameters
Name | Description |
---|---|
TValue | The type of data used in the Query Builder. |
Remarks
The QueryBuilderEvents<TValue> component is used to define callbacks for various events in the SfQueryBuilder<TValue>, such as value changes, rule modifications, and data binding.
Constructors
QueryBuilderEvents()
Declaration
public QueryBuilderEvents()
Properties
Changed
Gets or sets an event callback that is raised after a condition (And/Or), field, operator, or value has been changed.
Declaration
public EventCallback<ChangeEventArgs> Changed { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ChangeEventArgs> | An Microsoft.AspNetCore.Components.EventCallback<> that will be invoked with ChangeEventArgs. The default value is |
Remarks
This event is useful for triggering dependent logic or state updates after a change has occurred in the Query Builder.
Created
Gets or sets an event callback that is raised after the SfQueryBuilder<TValue> component is created.
Declaration
public EventCallback<object> Created { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> | An Microsoft.AspNetCore.Components.EventCallback<> that will be invoked with the component instance. The default value is |
Remarks
This event can be used to perform initialization tasks that require the component to be fully rendered.
DataBound
Gets or sets an event callback that is triggered when the data source is populated in the SfQueryBuilder<TValue>.
Declaration
public EventCallback<object> DataBound { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> | An Microsoft.AspNetCore.Components.EventCallback<>. The default value is |
Remarks
This event is raised after the Query Builder has been bound to its data source, allowing for further manipulation or inspection of the data.
OnActionFailure
Gets or sets an event callback that is raised when a data fetch request from a remote server fails.
Declaration
public EventCallback<Exception> OnActionFailure { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Exception> | An Microsoft.AspNetCore.Components.EventCallback<> that will be invoked with the System.Exception that occurred. The default value is |
Remarks
This event is particularly useful for handling errors that occur during remote data operations, allowing for custom error handling and user notification.
OnValueChange
Gets or sets an event callback that is raised before a condition (And/Or), field, operator, or value is changed.
Declaration
public EventCallback<ChangeEventArgs> OnValueChange { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ChangeEventArgs> | An Microsoft.AspNetCore.Components.EventCallback<> that will be invoked with ChangeEventArgs. The default value is |
Remarks
This event provides an opportunity to perform actions or validations before the change is committed.
RuleChanged
Gets or sets an event callback that is raised when a rule is changed.
Declaration
public EventCallback<RuleChangeEventArgs> RuleChanged { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RuleChangeEventArgs> | An Microsoft.AspNetCore.Components.EventCallback<> that will be invoked with RuleChangeEventArgs. The default value is |
Remarks
This event is triggered when a rule's properties, such as field, operator, or value, are modified. It provides detailed information about the change, including the rule's unique identifier and the type of change.
RuleDragStarting
Gets or sets an event callback that is invoked before a rule or group is dragged within the SfQueryBuilder<TValue>.
Declaration
public EventCallback<RuleDragStartingEventArgs> RuleDragStarting { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RuleDragStartingEventArgs> | An Microsoft.AspNetCore.Components.EventCallback<> that will be invoked with RuleDragStartingEventArgs. The default value is |
Remarks
This event is triggered only when the AllowDragAndDrop property is set to true
.
It allows you to cancel the drag operation by setting Cancel to true
.
RuleDropped
Gets or sets an event callback that is raised after a rule or group is dropped onto another item in the SfQueryBuilder<TValue>.
Declaration
public EventCallback<RuleDroppedEventArgs> RuleDropped { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RuleDroppedEventArgs> | An Microsoft.AspNetCore.Components.EventCallback<> that will be invoked with RuleDroppedEventArgs. The default value is |
Remarks
This event is triggered only when the AllowDragAndDrop property is set to true
, after a valid drop has occurred.
RuleDropping
Gets or sets an event callback that is invoked before a rule or group is dropped onto another item in the SfQueryBuilder<TValue>.
Declaration
public EventCallback<RuleDroppingEventArgs> RuleDropping { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RuleDroppingEventArgs> | An Microsoft.AspNetCore.Components.EventCallback<> that will be invoked with RuleDroppingEventArgs. The default value is |
Remarks
This event is triggered only when the AllowDragAndDrop property is set to true
.
It provides an opportunity to prevent the drop by setting Cancel to true
.
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 being disposed. |
Remarks
This method is called to clean up resources, such as nullifying the reference to the parent SfQueryBuilder<TValue>.
OnInitializedAsync()
Handles component initialization.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the asynchronous operation. |
Remarks
This method assigns the current instance to the parent SfQueryBuilder<TValue>'s Syncfusion.Blazor.QueryBuilder.SfQueryBuilder`1.Delegates property.