Articles in this section
Category / Section

What are the events used for filtering in WinForms GridGroupingControl?

1 min read

Filtering events

The following events are used in the GridGroupingControl for filtering.

1. The RecordFilters.Changing event occurs before the filter of the records are changed.

C#

this.gridGroupingControl1.TableDescriptor.RecordFilters.Changed+=new Syncfusion.Collections.ListPropertyChangingEventHandler(RecordFilters_Changing);

VB

AddHandler gridGroupingControl1.TableDescriptor.RecordFilters.Changed, AddressOf RecordFilters_Changing

2. The RecordFilters.changed event occurs after the filter of the records are changed.

C#

this.gridGroupingControl1.TableDescriptor.RecordFilters.Changed+=new Syncfusion.Collections.ListPropertyChangedEventHandler(RecordFilters_Changed);

VB

AddHandler gridGroupingControl1.TableDescriptor.RecordFilters.Changed, AddressOf RecordFilters_Changed

3. The FilterBarSelectedItemChanging event occurs before an item is selected through the filtered drop down.

C#

this.gridGroupingControl1.FilterBarSelectedItemChanging+=new Syncfusion.Windows.Forms.Grid.Grouping.FilterBarSelectedItemChangingEventHandler(gridGroupingControl1_FilterBarSelectedItemChanging);

VB

AddHandler gridGroupingControl1.FilterBarSelectedItemChanging, AddressOf gridGroupingControl1_FilterBarSelectedItemChanging

4. The FilterBarSelectedItemChanged event occurs after an item is selected through the filtered drop down.

C#

this.gridGroupingControl1.FilterBarSelectedItemChanged+=new Syncfusion.Windows.Forms.Grid.Grouping.FilterBarSelectedItemChangedEventHandler(gridGroupingControl1_FilterBarSelectedItemChanged);

VB

AddHandler gridGroupingControl1.FilterBarSelectedItemChanged, AddressOf gridGroupingControl1_FilterBarSelectedItemChanged

5. The QueryFilterBarChoices event occurs when the GridTableDescriptor is initialized with the allow filter.

C#

this.gridGroupingControl1.QueryFilterBarChoices+=new Syncfusion.Windows.Forms.Grid.Grouping.GridQueryFilterBarChoicesEventHandler(gridGroupingControl1_QueryFilterBarChoices);

VB

AddHandler gridGroupingControl1.QueryFilterBarChoices, AddressOf gridGroupingControl1_QueryFilterBarChoices

6. The ShowingCustomFilterDialog event occurs before the RecordFiltercollection dialog is displayed.

C#

GridDynamicFilter dynamicfilter = new GridDynamicFilter();
dynamicfilter.ShowingCustomFilterDialog+=new ControlEventHandler(dynamicfilter_ShowingCustomFilterDialog);

 VB

Dim dynamicfilter As New GridDynamicFilter()
AddHandler dynamicfilter.ShowingCustomFilterDialog, AddressOf dynamicfilter_ShowingCustomFilterDialog

 

Note:

Add the GridHelperclasses.windows dll to the GridDynamicFilter.

7. The RecordFiltersItemChanged and RecordFiltersItemChanging events occur when an item is filtered.

C#

GridExcelFilter excelfilter = new GridExcelFilter();
excelfilter.RecordFiltersItemChanged+=new Syncfusion.Collections.ListPropertyChangedEventHandler(excelfilter_RecordFiltersItemChanged); 
excelfilter.RecordFiltersItemChanging+=new Syncfusion.Collections.ListPropertyChangedEventHandler(excelfilter_RecordFiltersItemChanging);

VB

Dim excelfilter As New GridExcelFilter()
AddHandler excelfilter.RecordFiltersItemChanged, AddressOf excelfilter_RecordFiltersItemChanged
AddHandler excelfilter.RecordFiltersItemChanging, AddressOf excelfilter_RecordFiltersItemChanging

 

Note:

Add the GridHelperclasses.windows dll to the GridExcelFilter.

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied