# Grid Filter Menu

The `FilterMenu` filter mode renders a button in the column header. When you click the button, a popup with filtering options appears. The popup allows you to apply two filter criteria, choose a suitable filter operator and buttons to apply, or clear the filter.

## Enabling Filter Menu

Set the `FilterMode` parameter of the Telerik Grid to `GridFilterMode.FilterMenu` and make sure that all filterable columns have their `Field` parameter set.

```RAZOR.skip-repl
<TelerikGrid FilterMode="@GridFilterMode.FilterMenu" />
```

Also see the full [runnable example](https://www.telerik.com/blazor-ui/documentation/components/grid/filter/filter-menu#example) below.

## Customization

You can customize the default behavior of the Filter Menu with parameters of the columns and the Grid.

### Configuring the Filter Menu

You can override the default Filter Menu behavior for each column through the following property the `GridColumn` exposes:

<style>
    .article table {
        table-layout: auto;
        word-break: normal;
    }
</style>

| Parameter               | Type                       | Description                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ----------------------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DefaultFilterOperator` | `FilterOperator`           | Sets the default filter operator in the column it is declared for. Accepts a member of the `FilterOperator` enum. The selected operator must be applicable for the specific data type Check the supported options in the [Filter Operators](https://www.telerik.com/blazor-ui/documentation/common-features/data-binding/filter-operators) article. The provided default filter operator will be applied for both filters in the menu. |
| `Filterable`            | `bool` <br/> (`true`)      | Determines if the column renders allows filtering and renders filtering UI. Use the parameter to disable filtering for specific columns.                                                                                                                                                                                                                                                                                               |
| `FilterEditorFormat`    | `string`                   | The `Format` of the filtering component. Works for DateTime and numeric columns. Do not use a placeholder, for example, set `"D"`, not `"{0:D}"`.                                                                                                                                                                                                                                                                                      |
| `FilterEditorType`      | `enum`                     | The component to render for filtering of `DateTime` columns (`DatePicker` or `DateTimePicker`).                                                                                                                                                                                                                                                                                                                                        |
| `FilterOperators`       | `List<FilterListOperator>` | Specifies the available operators. Must contain only [supported filter operators](https://www.telerik.com/blazor-ui/documentation/common-features/data-binding/filter-operators) for the specific data type. If not defined, the component will use a default list of available operators based on the field type.                                                                                                                     |

### FilterMenuType

You can switch between [CheckBoxList](https://www.telerik.com/blazor-ui/documentation/components/grid/filter/checkboxlist) and a `Menu` filtering layout for a particular `<GridColumn>` by setting the `FilterMenuType` to `FilterMenuType.Menu` or `FilterMenuType.CheckBoxList`. Read the [CheckBoxList Filtering article](https://www.telerik.com/blazor-ui/documentation/components/grid/filter/checkboxlist) for more information.

### Filter Menu Template

The template will let you have full control over the Filter Row rendering and behavior. See how you can implement it and explore the example in the [Filter Menu Template](https://www.telerik.com/blazor-ui/documentation/components/grid/templates/filter#filter-menu-template) article.

## Filter From Code

To learn how to programmatically filter the Grid, refer to the [Grid State](https://www.telerik.com/blazor-ui/documentation/components/grid/state) documentation article. You can filter the Grid on initial display with the [`OnStateInit` event](https://www.telerik.com/blazor-ui/documentation/components/grid/state#onstateinit) or at any time afterwards with the [`SetStateAsync()` method](https://www.telerik.com/blazor-ui/documentation/components/grid/state#methods).

## Example

> caption Using the Grid Filter Menu

<demo metaUrl="client/grid/filter-menu/" height="500"></demo>

## See Also

* [Grid Filtering Overview](https://www.telerik.com/blazor-ui/documentation/components/grid/filter/overview)
* [Live Demo: Grid Filter Menu](https://demos.telerik.com/blazor-ui/grid/filter-menu)
* [Blazor Grid](https://www.telerik.com/blazor-ui/documentation/components/grid/overview)
