# Angular TreeList Manual Filtering

The manual filtering gives the developer full control over the filtering of the data. Compared to the [filtering with the built-in directive](https://www.telerik.com/kendo-angular-ui/components/treelist/filtering/basics#using-the-built-in-directives), the manual approach provides greater transparency of the filtering process because it requires you to handle the [Angular TreeList](https://www.telerik.com/kendo-angular-ui/components/treelist) events manually. The manual filtering is especially useful when you require additional customization of the filtering logic.

To implement manual filtering:

1. Set the [`filterable`](https://www.telerik.com/kendo-angular-ui/components/treelist/api/treelistcomponent#filterable) option.
2. Bind the [`filter`](https://www.telerik.com/kendo-angular-ui/components/treelist/api/treelistcomponent#filter) option to a [`CompositeFilterDescriptor`](https://www.telerik.com/kendo-angular-ui/components/data-query/api/compositefilterdescriptor) object.
3. To filter local data or send a remote service request, handle either of the following events:
   * [`filterChange`](https://www.telerik.com/kendo-angular-ui/components/treelist/api/treelistcomponent#filterchange) event—use it when only filtering is enabled.
   * [`dataStateChange`](https://www.telerik.com/kendo-angular-ui/components/treelist/api/treelistcomponent#datastatechange) event—use it when more than one data operation is enabled. Check the [`Data Operations`](https://www.telerik.com/kendo-angular-ui/components/treelist/data-operations) article for more details on how to handle multiple data operations.

## Filtering Local Data

To filter the data, use the built-in [`filterBy()`](https://www.telerik.com/kendo-angular-ui/components/data-query/api/filterby) or [`process()`](https://www.telerik.com/kendo-angular-ui/components/data-query/api/process) functions.

> When you enable multiple data operations, handle the `dataStateChange` event instead of the `filterChange` event and use the `process()` method. Further details on how to manually process the data with multiple data operations enabled are available in the section on [handling multiple data operations](https://www.telerik.com/kendo-angular-ui/components/treelist/data-operations#handling-multiple-data-operations).

The following example demonstrates this approach.

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

## Server-Side Filtering

Handle the [`filterChange`](https://www.telerik.com/kendo-angular-ui/components/treelist/api/treelistcomponent#filterchange) or [`dataStateChange`](https://www.telerik.com/kendo-angular-ui/components/treelist/api/treelistcomponent#datastatechange) event to send a request containing information about the current TreeList state to the server. For more details and an example, refer to [Processing Data on the Server](https://www.telerik.com/kendo-angular-ui/components/treelist/data-operations#processing-data-on-the-server).

## Suggested Links

* [FilterDescriptors](https://www.telerik.com/kendo-angular-ui/components/data-query/api/filterdescriptor)
* [dataStateChange](https://www.telerik.com/kendo-angular-ui/components/treelist/api/treelistcomponent#datastatechange)
* [Built-In Row Filter Templates](https://www.telerik.com/kendo-angular-ui/components/treelist/filtering/filter-row)
* [Built-In Menu Filter Templates](https://www.telerik.com/kendo-angular-ui/components/treelist/filtering/filter-menu)
* [Reusable Custom Filter Components](https://www.telerik.com/kendo-angular-ui/components/treelist/filtering/filter-row#custom-filter-row-components)
* [Data Binding Basics](https://www.telerik.com/kendo-angular-ui/components/treelist/data-binding/basics)
* [Automatic Data Binding](https://www.telerik.com/kendo-angular-ui/components/treelist/data-binding/local-data#automatic-data-processing)
* [API Reference of the TreeListComponent](https://www.telerik.com/kendo-angular-ui/components/treelist/api/treelistcomponent)
