Class QueryBuilderOperator
A class that represents the operator model of "SfQueryBuilder"
component to specify the customized option to the operator dropdown list.
Inheritance
Namespace: Syncfusion.Blazor.QueryBuilder
Assembly: Syncfusion.Blazor.dll
Syntax
public class QueryBuilderOperator : OwningComponentBase
Remarks
You can customize filtering, popup width and height, width of the operator dropdown list by specifying value to corresponding property. Remaining necessary properties were added to dropdown list by default.
Examples
In the below code example, field dropdown list can be customized using QueryBuilderOperator tag directive.
<SfQueryBuilder TValue="Employee">
<QueryBuilderOperator AllowFiltering="true"></QueryBuilderField>
<QueryBuilderColumns>
<QueryBuilderColumn Field="CustomerID" Label="CustomerID" Type=Syncfusion.Blazor.QueryBuilder.ColumnType.String Values="values">
</QueryBuilderColumn>
<QueryBuilderColumn Field="EmployeeID" Label="EmployeeID" Type=Syncfusion.Blazor.QueryBuilder.ColumnType.Number></QueryBuilderColumn>
</QueryBuilderColumns>
</SfQueryBuilder>
Constructors
QueryBuilderOperator()
Declaration
public QueryBuilderOperator()
Properties
AllowFiltering
Gets or sets a value that indicates whether to enable or disable the filtering option in the operator dropdown list.
Declaration
public bool AllowFiltering { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
FilterBarPlaceholder
Gets or sets a value that indicates place holder for filtering option in operator dropdown list.
Declaration
public string FilterBarPlaceholder { get; set; }
Property Value
Type | Description |
---|---|
System.String | The filter bar place holder accepts a string value. The default value is |
FilterType
Gets or sets a value that indicates the filter type.
Declaration
public FilterType FilterType { get; set; }
Property Value
Type | Description |
---|---|
FilterType | One of the FilterType enumeration. The default value is StartsWith |
Remarks
If the FilterType
is StartsWith
, the filtering will be performed using starts with operator.
If the FilterType
is EndsWith
, the filtering will be performed using ends with operator.
If the FilterType
is Contains
, the filtering will be performed using contains operator.
OperatorDropDownClosed
Gets or sets an event callback that is raised while closing operator dropdown list.
Declaration
public EventCallback<object> OperatorDropDownClosed { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Remarks
You can customize the dropdown list item rendering using System.Object.
Examples
In the below code example, the OperatorDropDownClosed
event is used.
<SfQueryBuilder TValue="Employee">
<QueryBuilderOperator OperatorDropDownClosed="OnBlur"></QueryBuilderOperator>
<QueryBuilderColumns>
<QueryBuilderColumn Field="CustomerID" Label="CustomerID" Type=Syncfusion.Blazor.QueryBuilder.ColumnType.String Values="values">
</QueryBuilderColumn>
<QueryBuilderColumn Field="EmployeeID" Label="EmployeeID" Type=Syncfusion.Blazor.QueryBuilder.ColumnType.Number></QueryBuilderColumn>
</QueryBuilderColumns>
</SfQueryBuilder>
@code {
private void OnBlur(object args)
{
//write your code here
}
}
OperatorDropDownFiltering
Gets or sets an event callback that is raised while filtering on operator dropdown list.
Declaration
public EventCallback<FilteringEventArgs> OperatorDropDownFiltering { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<FilteringEventArgs> |
Remarks
You can customize the filtering using FilteringEventArgs
.
OperatorDropDownOpened
Gets or sets an event callback that is raised after opening operator dropdown list.
Declaration
public EventCallback<PopupEventArgs> OperatorDropDownOpened { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<PopupEventArgs> |
Remarks
You can customize the dropdown list item rendering using PopupEventArgs
.
Examples
In the below code example, the OperatorDropDownOpened
event is used.
<SfQueryBuilder TValue="Employee">
<QueryBuilderOperator OperatorDropDownOpened="Opened"></QueryBuilderOperator>
<QueryBuilderColumns>
<QueryBuilderColumn Field="CustomerID" Label="CustomerID" Type=Syncfusion.Blazor.QueryBuilder.ColumnType.String Values="values">
</QueryBuilderColumn>
<QueryBuilderColumn Field="EmployeeID" Label="EmployeeID" Type=Syncfusion.Blazor.QueryBuilder.ColumnType.Number></QueryBuilderColumn>
</QueryBuilderColumns>
</SfQueryBuilder>
@code {
private void Opened(PopupEventArgs args)
{
//write your code here
}
}
OperatorDropDownOpening
Gets or sets an event callback that is raised while opening operator dropdown list.
Declaration
public EventCallback<BeforeOpenEventArgs> OperatorDropDownOpening { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<BeforeOpenEventArgs> |
Remarks
You can customize the dropdown list item rendering using BeforeOpenEventArgs
.
Examples
In the below code example, the OperatorDropDownOpening
event is used.
<SfQueryBuilder TValue="Employee">
<QueryBuilderOperator OperatorDropDownOpening="OperatorDropDownOpening"></QueryBuilderOperator>
<QueryBuilderColumns>
<QueryBuilderColumn Field="CustomerID" Label="CustomerID" Type=Syncfusion.Blazor.QueryBuilder.ColumnType.String Values="values">
</QueryBuilderColumn>
<QueryBuilderColumn Field="EmployeeID" Label="EmployeeID" Type=Syncfusion.Blazor.QueryBuilder.ColumnType.Number></QueryBuilderColumn>
</QueryBuilderColumns>
</SfQueryBuilder>
@code {
private void OperatorDropDownOpening(BeforeOpenEventArgs args)
{
//write your code here
}
}
Placeholder
Gets or sets a value that indicates place holder for operator dropdown list.
Declaration
public string Placeholder { get; set; }
Property Value
Type | Description |
---|---|
System.String | The place holder accepts a string value. The default value is |
PopupHeight
Gets or sets a value that indicates height of operator dropdown list's popup.
Declaration
public string PopupHeight { get; set; }
Property Value
Type | Description |
---|---|
System.String | The popup height accepts a string value. The default value is |
PopupWidth
Gets or sets a value that indicates width of operator dropdown list's popup.
Declaration
public string PopupWidth { get; set; }
Property Value
Type | Description |
---|---|
System.String | The popup width accepts a string value. The default value is |
ShowClearButton
Gets or sets a value that indicates whether to enable or disable the clear button in the operator dropdown list.
Declaration
public bool ShowClearButton { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Width
Gets or sets a value that indicates width of operator dropdown list.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | The width accepts a string value. The default value is |
Methods
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |