Class GridQueryFilterBarChoicesEventArgs
Defines a class that provides data for the QueryFilterBarChoices event which occurs when GridTableDescriptor is initializing columns with AllowFilter is set to "True" and gives you the options to handle filterbarchoices through custom code. In such case the event is also raised when the user clicks on dropdown button of a GridTableFilterBarCellRenderer
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid.Grouping
Assembly: Syncfusion.Grid.Grouping.Windows.dll
Syntax
public sealed class GridQueryFilterBarChoicesEventArgs : SyncfusionCancelEventArgs
Remarks
In event handler code you should check whether Element is null (Nothing).
If it is null then only set ShouldCreateSummaryDescriptor to "false" if you want to provide your own choice list.
If it is not null then you should initialize the UniqueFilterBarValues with choices to be displayed to the user.
Constructors
GridQueryFilterBarChoicesEventArgs(GridColumnDescriptor, Boolean, Element)
Initialize a new instance of the GridQueryFilterBarChoicesEventArgs class.
Declaration
public GridQueryFilterBarChoicesEventArgs(GridColumnDescriptor column, bool shouldCreateSummaryDescriptor, Element element)
Parameters
Type | Name | Description |
---|---|---|
GridColumnDescriptor | column | Column name. |
System.Boolean | shouldCreateSummaryDescriptor | True if summary descriptor should be created. |
Element | element | The element at the filter row. |
Properties
Column
Gets the values of the column in which the choices to be shown.
Declaration
[TraceProperty(true)]
public GridColumnDescriptor Column { get; }
Property Value
Type |
---|
GridColumnDescriptor |
Element
Gets the value of the element from the filter drop down.
Declaration
public Element Element { get; }
Property Value
Type |
---|
Element |
Remarks
When a user clicks on the drop down button of a FilterBarCell then this event is raised and the Element will contain the element at the given filter bar row. You can check Element.ParentGroup to find out which group the element belongs to. If Element is null (Nothing) you should simply set ShouldCreateSummaryDescriptor as needed.
ShouldCreateSummaryDescriptor
Gets or sets a value indicating whether to create summary descriptor or not.
Declaration
[TraceProperty(true)]
public bool ShouldCreateSummaryDescriptor { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
Set this property false if you do not want a summary being created for the specified column. The engine will raise the event with Element = null (Nothing) in order to investigate for which columns it should create internal summaries.
UniqueFilterBarValues
Gets or sets the unique filter bar values that is being displayed in the filter drop down.
Declaration
public object[] UniqueFilterBarValues { get; set; }
Property Value
Type |
---|
System.Object[] |
Remarks
When a user clicks on the drop down button of a FilterBarCell then this event is raised and the Element will contain the element at the given filter bar row. You should then initialize this array with values that should be displayed in the drop down.