Class QueryBuilderField
A class that represents the field model of SfQueryBuilder
component to specify the customized option to the field dropdown list.
Inheritance
Namespace: Syncfusion.Blazor.QueryBuilder
Assembly: Syncfusion.Blazor.dll
Syntax
public class QueryBuilderField : OwningComponentBase
Remarks
You can customize filtering, popup width and height, width of the field 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 QueryBuilderField tag directive.
<SfQueryBuilder TValue="Employee">
<QueryBuilderField 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
QueryBuilderField()
Declaration
public QueryBuilderField()
Properties
AllowFiltering
Gets or sets a value that indicates whether to enable or disable the filtering option in the field dropdown list.
Declaration
public bool AllowFiltering { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
FieldDropDownClosed
Gets or sets an event callback that is raised while closing field dropdown list.
Declaration
public EventCallback<object> FieldDropDownClosed { 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 FieldDropDownClosed
event is used.
<SfQueryBuilder TValue="Employee">
<QueryBuilderField FieldDropDownClosed="OnBlur"></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>
@code {
private void OnBlur(object args)
{
//write your code here
}
}
FieldDropDownFiltering
Gets or sets an event callback that is raised while filtering on field dropdown list.
Declaration
public EventCallback<FilteringEventArgs> FieldDropDownFiltering { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<FilteringEventArgs> |
Remarks
You can customize the filtering using FilteringEventArgs
.
FieldDropDownOpened
Gets or sets an event callback that is raised after opening field dropdown list.
Declaration
public EventCallback<PopupEventArgs> FieldDropDownOpened { 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 FieldDropDownOpened
event is used.
<SfQueryBuilder TValue="Employee">
<QueryBuilderField FieldDropDownOpened="Opened"></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>
@code {
private void Opened(PopupEventArgs args)
{
//write your code here
}
}
FieldDropDownOpening
Gets or sets an event callback that is raised while opening field dropdown list.
Declaration
public EventCallback<BeforeOpenEventArgs> FieldDropDownOpening { 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 FieldDropDownOpening
event is used.
<SfQueryBuilder TValue="Employee">
<QueryBuilderField FieldDropDownOpening="FieldDropDownOpening"></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>
@code {
private void FieldDropDownOpening(BeforeOpenEventArgs args)
{
//write your code here
}
}
FilterBarPlaceholder
Gets or sets a value that indicates place holder for filtering option in field 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.
Placeholder
Gets or sets a value that indicates place holder for field 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 field 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 field 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 field dropdown list.
Declaration
public bool ShowClearButton { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Width
Gets or sets a value that indicates width of field 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 |