# ColumnFilter

Canonical page: https://www.adaptabletools.com/docs/reference/columnfilter

A filter on one column in a layout.

`Expression` is a boolean AdapTableQL expression and is what hides rows. `PreferredFilter` is only the operator shown in the filter UI before an expression exists; it does not hide rows. Setting `Expression` clears `PreferredFilter`. `IsSuspended: true` turns the filter off.

```ts title="TypeScript"
export interface ColumnFilter extends SuspendableObject 
```

###### Extends

[`SuspendableObject`](https://www.adaptabletools.com/docs/reference/suspendableobject.md)

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [ColumnId](https://www.adaptabletools.com/docs/reference/columnfilter.md#columnid) | `string` | Column where Filter should be applied |
| [Expression](https://www.adaptabletools.com/docs/reference/columnfilter.md#expression) | `string` | AdaptableQL boolean expression evaluated for each row, e.g.<br/><br/>`[price] > 100 AND [price] < 200 OR [price] = 350`<br/><br/>Mutually exclusive with : when<br/>`Expression` is set, `PreferredFilter` is not persisted. |
| [PreferredFilter](https://www.adaptabletools.com/docs/reference/columnfilter.md#preferredfilter) | `string` | Preferred filter operator when there is no `Expression` (UI seed only —<br/>does not filter rows). Uses AQL operator / function names, the same<br/>vocabulary as `columnFilterOptions.default*ColumnFilter` (e.g. `'IN'`,<br/>`'STARTS_WITH'`, `'EQ'`).<br/><br/>Mutually exclusive with : set when the<br/>user selects an operator before the filter is complete; removed as<br/>soon as a valid `Expression` is persisted; restored from the current<br/>UI operator when the `Expression` is cleared. |
| [IsReadOnly](https://www.adaptabletools.com/docs/reference/columnfilter.md#isreadonly) | `boolean` | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of &#39;Full&#39;) |
| [IsSuspended](https://www.adaptabletools.com/docs/reference/columnfilter.md#issuspended) | `boolean` | Suspends (i.e. turns off) an Adaptable Object |

## Property Details

### ColumnId

Column where Filter should be applied

```ts title="TypeScript"
ColumnId: string;
```

###### Property Value

`string`

### Expression

AdaptableQL boolean expression evaluated for each row, e.g.

`[price] > 100 AND [price] < 200 OR [price] = 350`

Mutually exclusive with : when
`Expression` is set, `PreferredFilter` is not persisted.

```ts title="TypeScript"
Expression?: string;
```

###### Property Value

`string`

### PreferredFilter

Preferred filter operator when there is no `Expression` (UI seed only —
does not filter rows). Uses AQL operator / function names, the same
vocabulary as `columnFilterOptions.default*ColumnFilter` (e.g. `'IN'`,
`'STARTS_WITH'`, `'EQ'`).

Mutually exclusive with : set when the
user selects an operator before the filter is complete; removed as
soon as a valid `Expression` is persisted; restored from the current
UI operator when the `Expression` is cleared.

```ts title="TypeScript"
PreferredFilter?: string;
```

###### Property Value

`string`

### IsSuspended

> *Inherited from [SuspendableObject](https://www.adaptabletools.com/docs/reference/suspendableobject.md)*

Suspends (i.e. turns off) an Adaptable Object

```ts title="TypeScript"
IsSuspended?: boolean;
```

###### Property Value

`boolean`

### IsReadOnly

> *Inherited from [AdaptableObject](https://www.adaptabletools.com/docs/reference/adaptableobject.md)*

Sets Entity to ReadOnly (overwriting a Strategy Entitlement of &#39;Full&#39;)

```ts title="TypeScript"
IsReadOnly?: boolean;
```

###### Property Value

`boolean`
