Skip to main content
You are viewing help content for pre-release software. This document and the features it describes are subject to change.
All docs
V24.1

FilterPopupExcelEventArgs.HideFilter(CustomUIFilterType) Method

Hides an operator from the Filters tab.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v24.1.dll

Declaration

public bool HideFilter(
    CustomUIFilterType filterType
)

Parameters

Name Type Description
filterType DevExpress.Utils.Filtering.Internal.CustomUIFilterType

An operator that should be hidden.

Returns

Type Description
Boolean

true if the operator is added to a list of hidden operators; false if the operator is already in the list.

Remarks

The following code sample hides operators from the Filters tab:

WinForms Grid - Hide Operators from the Excel Filter

void gridView1_ShowFilterPopupExcel(object sender, DevExpress.XtraGrid.Views.Grid.FilterPopupExcelEventArgs e) {
    if (e.Column.FieldName == "UnitPrice") {
        e.HideFilter(DevExpress.Utils.Filtering.Internal.CustomUIFilterType.BelowAverage);
        e.HideFilter(DevExpress.Utils.Filtering.Internal.CustomUIFilterType.Between);
        e.HideFilter(DevExpress.Utils.Filtering.Internal.CustomUIFilterType.BottomN);
        e.HideFilter(DevExpress.Utils.Filtering.Internal.CustomUIFilterType.Custom);
        e.HideFilter(DevExpress.Utils.Filtering.Internal.CustomUIFilterType.DoesNotEqual);
        e.HideFilter(DevExpress.Utils.Filtering.Internal.CustomUIFilterType.InRange);
        e.HideFilter(DevExpress.Utils.Filtering.Internal.CustomUIFilterType.LessThan);
        e.HideFilter(DevExpress.Utils.Filtering.Internal.CustomUIFilterType.LessThanOrEqualTo);
    }
}

When you hide filters displayed in Specific Date Periods, the remaining filters are displayed as a checked list.

See Also