Skip to main content

Filter Button

Filter buttons are displayed within column headers and can be clicked to activate filter dropdown lists. Such lists enable end-users to specify data filtering conditions.

VisualElems_GridView_FilterButton

The table below lists the main properties affecting element appearance.

Style

The GridOptionsView.HeaderFilterButtonShowMode property allows you to choose whether the filter buttons will be displayed as smart tags or in the traditional way - as regular buttons.

Appearance

GridViewAppearances.ColumnFilterButton, GridViewAppearances.ColumnFilterButtonActive

Note: These settings are not in effect when the filter buttons are painted as smart tags (see the GridOptionsView.HeaderFilterButtonShowMode property).

Custom Draw Event

GridView.CustomDrawColumnHeader

Icon and Icon Settings

Since all DevExpress controls use images and settings from the currently applied skin, to modify the button icon you need to create a custom Skin. You can do this in the WinForms Skin Editor. The name of a skin element responsible for the Filter Button is “Smart Filter” (the “Grid - Column Headers - Filtering” category).

Availability

A View’s GridOptionsCustomization.AllowFilter option and a column’s OptionsColumnFilter.AllowFilter option.

See Also