# Angular Grid Filtering Basics

The [Angular Grid](https://www.telerik.com/kendo-angular-ui-develop/components/grid) filtering feature enables you to display only those Grid records that meet specific filter criteria.

You can enable the filtering feature by using two methods:

* [The Data-Binding Directive](https://www.telerik.com/kendo-angular-ui-develop/components/grid/filtering/basics#using-the-built-in-directive)—Allows you to implement filtering (or other [data operations](https://www.telerik.com/kendo-angular-ui-develop/components/grid/data-operations)) with less code.
* [Manual Filtering](https://www.telerik.com/kendo-angular-ui-develop/components/grid/filtering/manual-filtering)—Provides more control when implementing the filtering feature.

## Using the Built-in Directive

The [`kendoGridBinding`](https://www.telerik.com/kendo-angular-ui-develop/components/grid/api/databindingdirective) directive performs filtering automatically.

The following example demonstrates how to enable filtering using `kendoGridBinding` directive.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/grid/data-operations/directive/filtering/source.txt)

To enable the built-in Grid filtering:

1. Set the Grid [`filterable`](https://www.telerik.com/kendo-angular-ui-develop/components/grid/api/gridcomponent#filterable) option to `true`.
2. (Optional) Set the [`filter`](https://www.telerik.com/kendo-angular-ui-develop/components/grid/api/gridcomponent#filter) property to a [`CompositeFilterDescriptor`](https://www.telerik.com/kendo-angular-ui-develop/components/data-query/api/compositefilterdescriptor) object. This allows you to filter the data by specific criteria during the initialization of the Grid.

```html
<kendo-grid
      [kendoGridBinding]="gridData"
      [filterable]="true"
    >
      <kendo-grid-column field="CompanyName"></kendo-grid-column>
</kendo-grid>
```

> To learn more about the data binding directive and to understand how it works under the hood, see the [data operations with the DataBinding directive](https://www.telerik.com/kendo-angular-ui-develop/components/grid/data-operations#automatic-data-processing) article.

## Filter Modes

The Grid supports three filtering modes that display different filtering UI.

| Mode                 | Setup                                                                                                                                  | Description                                                                                        | When to use                                                                                                                                                                                                                                    |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Filter row (default) | Set [`filterable`](https://www.telerik.com/kendo-angular-ui-develop/components/grid/api/gridcomponent#filterable) to `true` or `'row'` | Filter controls render below each column header. The data updates automatically as the user types. | Filtering is frequent and users need filter criteria always visible.                                                                                                                                                                           |
| Filter menu          | Set [`filterable`](https://www.telerik.com/kendo-angular-ui-develop/components/grid/api/gridcomponent#filterable) to `'menu'`          | A filter icon displays in the column header. The data filters when the user clicks **Filter**.     | Column space is limited, filtering is infrequent, or you need two simultaneous conditions per column. For details, refer to the [Filter Menu](https://www.telerik.com/kendo-angular-ui-develop/components/grid/filtering/filter-menu) article. |
| Filter menu and row  | Set [`filterable`](https://www.telerik.com/kendo-angular-ui-develop/components/grid/api/gridcomponent#filterable) to `'menu, row'`     | Combines the filter menu and the filter row.                                                       | You need the always-visible row for quick input and the menu for multi-condition filtering.                                                                                                                                                    |

The following example demonstrates the available filter modes of the Grid.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/grid/filtering/modes/source.txt)

## Filter Data Types

In its column filters, the Grid provides a built-in filtering UI for all basic data types (`string`, `number`, `Date`, `boolean`). You can set the filtering UI type through the [filter](https://www.telerik.com/kendo-angular-ui-develop/components/grid/api/columncomponent#filter) input property of each column.

### Text Filter

The text filter is the default filter type. Its UI is a [`TextBox`](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/textbox) component.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/grid/filtering/filter-types/text/source.txt)

### Numeric Filter

The numeric filtering UI is a [`NumericTextBox`](https://www.telerik.com/kendo-angular-ui-develop/components/inputs/numerictextbox) component.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/grid/filtering/filter-types/number/source.txt)

### Date Filter

The date filtering UI is the [`DatePicker`](https://www.telerik.com/kendo-angular-ui-develop/components/dateinputs/datepicker) component.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/grid/filtering/filter-types/date/source.txt)

### Boolean Filter

The boolean filtering UI utilizes the [`DropDownList`](https://www.telerik.com/kendo-angular-ui-develop/components/dropdowns/dropdownlist) component.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/grid/filtering/filter-types/boolean/source.txt)

## Filtering Extensions

Depending on your application requirements, you can extend the built-in filtering feature with custom operators, multi-checkbox selection, custom filter components, filtering driven from outside the Grid, or AI-powered filtering.

### AI-Powered Filtering

The Grid provides an AI-powered filtering feature that allows users to filter data using natural language queries. This feature is available through the [Kendo UI AI Toolbar](https://www.telerik.com/kendo-angular-ui-develop/components/grid/smart-grid/ai-toolbar-assistant) component, which can be integrated with the Grid to provide an intuitive and user-friendly filtering experience.

### Filtering with Custom Operators

Each built-in filter UI exposes a set of operators, such as `"contains"`, `"eq"`, or `"gte"`. To change the default operator or limit the available operators, use the `operator` property on the built-in filter components. For an example, refer to the [Filter Menu](https://www.telerik.com/kendo-angular-ui-develop/components/grid/filtering/filter-menu#default-filter-operator) article.

### Multi-Checkbox Filtering

The Grid provides a built-in Excel-like multi-checkbox filter that lets users select multiple values to filter by at the same time. To use it, refer to the [Multi-Checkbox Filter](https://www.telerik.com/kendo-angular-ui-develop/components/grid/filtering/multi-checkbox-filter) article.

### Custom Filter Components

For scenarios where the built-in filter UI is not sufficient, you can replace it with a completely custom component using the `FilterMenuTemplateDirective` or the filter row template. For examples, refer to the [Filter Menu](https://www.telerik.com/kendo-angular-ui-develop/components/grid/filtering/filter-menu#custom-filters) and [Filter Row](https://www.telerik.com/kendo-angular-ui-develop/components/grid/filtering/filter-row#custom-filter-row-components) articles.

### External Filtering

You can filter the Grid from outside the component—for example, from a search input in the page header. This approach uses the Grid's `filter` property and `filterChange` event to synchronize the filter state with an external control. For details, refer to the [External Filtering](https://www.telerik.com/kendo-angular-ui-develop/components/grid/filtering/external-filtering) article.

## Suggested Links

* [AI-Powered Filtering](https://www.telerik.com/kendo-angular-ui-develop/components/grid/smart-grid/ai-toolbar-assistant)
* [Multi-Checkbox Menu Filtering](https://www.telerik.com/kendo-angular-ui-develop/components/grid/filtering/multi-checkbox-filter)
* [Built-In Row Filter Templates](https://www.telerik.com/kendo-angular-ui-develop/components/grid/filtering/filter-row)
* [Built-In Menu Filter Templates](https://www.telerik.com/kendo-angular-ui-develop/components/grid/filtering/filter-menu)
* [Reusable Custom Filter Components](https://www.telerik.com/kendo-angular-ui-develop/components/grid/filtering/filter-row#custom-filter-row-components).
* [Data Binding Basics](https://www.telerik.com/kendo-angular-ui-develop/components/grid/data-binding/basics)
* [Automatic Data Binding](https://www.telerik.com/kendo-angular-ui-develop/components/grid/data-binding/local-data#automatic-data-processing)
* [FilterDescriptors](https://www.telerik.com/kendo-angular-ui-develop/components/data-query/api/filterdescriptor)
* [dataStateChange](https://www.telerik.com/kendo-angular-ui-develop/components/grid/api/gridcomponent#datastatechange)
* [API Reference of the GridComponent](https://www.telerik.com/kendo-angular-ui-develop/components/grid/api/gridcomponent)
