Skip to main content

ColumnView.ShowFilterPopupExcel Event

Allows you to hide specific filtering conditions from the “Filters” and “Values” tabs of the Excel-style Filter Dropdown.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v23.2.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

[DXCategory("Behavior")]
public event FilterPopupExcelEventHandler ShowFilterPopupExcel

Event Data

The ShowFilterPopupExcel event's data class is FilterPopupExcelEventArgs. The following properties provide information specific to this event:

Property Description
Column Gets the grid column being processed. Inherited from FilterPopupEventArgs.
DefaultFilterType Gets or sets the operator selected by default in the Filters tab.
IsRadioMode Gets or sets whether single (the radio mode) or multiple values can be selected simultaneously in the Values tab.
ShowAdvancedDatePeriods
ShowAggregates Gets or sets whether to show filters for aggregates (Below Average, Above Average, etc.).
ShowBlanks Gets or sets whether to show the IsBlank and IsNotBlank filter conditions.
ShowComparisons Gets or sets whether to show comparison filter conditions (Greater Than, Less Than, etc.).
ShowCustomFilters Gets or sets whether to show the Custom Filters.
ShowDatePeriods
ShowFiltersTab Gets or sets whether to show the Filters tab.
ShowLikeFilters Gets or sets whether to show the pattern-matching (Is Like, Is Not Like) operators for string values.
ShowNulls Gets or sets whether to show the Is Null and Is Not Null filter conditions.
ShowPredefinedFilters Gets or sets whether to show the Predefined Filters option in the Filters tab.
ShowSequences Gets or sets whether to show filters for sequences (Top N, Bottom N, etc.).

Remarks

The ShowFilterPopupExcel event allows you to hide specific predefined conditions from the Filters tab of the Excel-style Filter Dropdown. For instance, by default, the Filters tab contains the Is Null and Is Not Null filter conditions. See the figure below.

ColumnView_ShowFilterPopupExcel

The following code illustrates how to hide these conditions from the Filters tab.

void gridView1_ShowFilterPopupExcel(object sender, FilterPopupExcelEventArgs e) {
    e.ShowNulls = false;
}

See the result below.

ColumnView_ShowFilterPopupExcel_HideNulls

Instead of handling the ShowFilterPopupExcel event, you can also use related static properties accessible through the DevExpress.Utils.Filtering.ExcelFilterOptions.Default field. By doing so, you can hide specific filtering conditions for all Data Grid controls at once.

ExcelFilterOptions.Default.ShowNulls = false;
See Also