# Grid Filter Row

The FilterRow filtering mode renders a row below the column headers, providing a UI where you can fill in the filter criteria.

The Grid applies the filters as the user types in the filtering input.

## Enabling Filter Row

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

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

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

The default filter operator is `Contains` for `string` columns and `IsEqualTo` for numbers and dates. Boolean columns display a filtering drop down that effectively combines the filter operator and value.

## Customization

You can customize the default behavior of the filter row with parameters of the columns and the Grid.

### Configuring the Filter Row

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

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

| Parameter               | Type and Default Value     | 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. |
| `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.                                   |
| `ShowFilterCellButtons` | `bool` <br/> (`true`)      | controls the visibility of the filter buttons                                                                                                                                                                                                                                                                                                        |

### Debouncing the Filtering

By default, the filtering will be debounced with 150ms. Configure that with the following component parameter:

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

| Parameter                | Type and Default Value | Description                                                                                                                                                                                                                     |
| ------------------------ | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `FilterRowDebounceDelay` | `int` <br/> (`150`)    | Time in milliseconds between the last typed symbol in the input and the actual filtering. Affects how fast the component initiates filtering. Use it to balance between client-side performance and number of database queries. |

### Filter Row 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 Row Template](https://www.telerik.com/blazor-ui/documentation/components/grid/templates/filter#filter-row-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 Row

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

## See Also

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