Class FilterDialogOpeningEventArgs
Provides information about the FilterDialogOpening event.
Inherited Members
Namespace: Syncfusion.Blazor.Grids
Assembly: Syncfusion.Blazor.dll
Syntax
public class FilterDialogOpeningEventArgs : GridEventBaseArgs
Constructors
FilterDialogOpeningEventArgs()
Declaration
public FilterDialogOpeningEventArgs()
Properties
Cancel
Gets or sets a value indicating whether to cancel the filter dialog opening action in the grid.
Declaration
public bool Cancel { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is |
CheckboxListData
Declaration
public IEnumerable<object> CheckboxListData { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> | An IEnumerable collection of objects that serve as the custom data source for the Checkbox and Excel filter types in grid, By default the value is |
ColumnName
Gets the Field name of the column which is associated with filtering.
Declaration
public string ColumnName { get; }
Property Value
Type | Description |
---|---|
System.String | The field name of the column which is associated with filtering. |
FilterChoiceCount
Gets or sets the number of items to be displayed in the filter popup for CheckBox and Excel filters.
Declaration
public int FilterChoiceCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of items to be displayed in the filter popup. The default value is 0. |
Remarks
If this property value is greater than 0, the filter popup will display the specified number of items. Otherwise, 1000 records will be displayed in the filter popup.
FilterOperators
Gets or sets the custom filter operators for Menu filter .
Declaration
public List<IFilterOperator> FilterOperators { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<IFilterOperator> | A list of IFilterOperator that represent the custom filter operators. By default, the value is null. |
Examples
<SfGrid TValue="Order" AllowFiltering="true" AllowPaging="true" DataSource="@Orders">
<GridEvents FilterDialogOpening="FilterDialogOpeningHandler" TValue="Order"></GridEvents>
<GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.Menu"></GridFilterSettings>
. . .
</SfGrid>
@code {
private SfGrid<Order> Grid;
public List<Order> Orders { get; set; }
public async Task FilterDialogOpeningHandler(FilterDialogOpeningEventArgs args)
{
if (args.ColumnName == "OrderDate")//Specify Field name
{
args.FilterOperators = CustomerIDOperator;
}
}
public class Operators: IFilterOperator
{
public Syncfusion.Blazor.Operator Value { get; set; }
public string Text { get; set; }
}
List<IFilterOperator> CustomerIDOperator = new List<IFilterOperator> {
new Operators() { Text = "Equal", Value = Syncfusion.Blazor.Operator.Equal },
new Operators() { Text = "Contains", Value = Syncfusion.Blazor.Operator.Contains },
new Operators() { Text = "Greater/Equal(Between)", Value = Syncfusion.Blazor.Operator.GreaterThanOrEqual}
};
}