# Column Menu

The TreeList enables you to show a menu with quick actions for its columns. The Column Menu enables you to perform high-level customization like [sorting](https://www.telerik.com/blazor-ui/documentation/components/treelist/sorting), [filtering](https://www.telerik.com/blazor-ui/documentation/components/treelist/filter/overview), [showing or hiding](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/visible) columns and [freezing or unfreezing](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/frozen) them.

> caption In this article:

* [Basics](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/menu#basics)
* [Features](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/menu#features)
  * [Column Chooser](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/menu#column-chooser)
  * [Filtering](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/menu#filtering)
  * [Frozen Columns](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/menu#frozen-columns)
  * [Column Sections](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/menu#column-sections)
  * [Sorting](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/menu#sorting)
  * [Reordering](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/menu#reordering)
* [Example](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/menu#example)
* [Notes](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/menu#notes)

## Basics

To enable the Column Menu, set the `ShowColumnMenu` parameter of the `<TelerikTreeList>` tag to `true`. This will enable the menu for each column of the TreeList.

To disable the Column Menu for a specific column in the TreeList, set the `ShowColumnMenu` parameter of the column to `false`.

> caption Enable the column menu for all TreeList columns.

<demo metaUrl="client/treelist/columns/menu/example-1/" height="720"></demo>

## Features

To control the features of the Column Menu, use the `<TreeListColumnMenuSettings>` tag, nested inside the `<TreeListSettings>` tag. By default, all Column Menu features are enabled.

### Column Chooser

The Column Chooser in the Column Menu allows you to toggle the visibility of TreeList columns. By default, all columns are visible under the **Columns** section of the Column Menu. To expand the menu, click the **Columns** item.

The **Apply** button sets the column visibility according to the current checkbox values and closes the column menu. The **Reset** button reverts the checkbox values to their state when the column menu was opened. At this point, the user can start over, click **Apply**, or click outside the column menu to close it.

* To disable the column chooser, set the `ShowColumnChooser` parameter of the `<TreeLisColumnMenuSettings>` to `false`.
* To hide a column from the Column Chooser, set the `VisibleInColumnChooser` property of the column to `false`.

### Filtering

To control whether filtering is possible from the Column Menu, set the `FilterMode` parameter of the `TreeListColumnMenuSettings` tag to a member of the `ColumnMenuFilterMode` enum:

* `None`—disables the filtering from the Column Menu. This is the recommended option if you use the [`FilterRow` mode](https://www.telerik.com/blazor-ui/documentation/components/treelist/filter/filter-row).
* `FilterMenu`—enables filtering from a filter menu.

### Frozen Columns

To disable the locking and unlocking of a column from the Column Menu, set the `Lockable` parameter of the column to `false`.

### Sorting

To remove the sorting option from the Column Menu, set the `Sortable` parameter of the `TreeListColumnMenuSettings` tag to `false`.

### Reordering

To allow column reordering from the Column Menu, set the `Reorderable` parameter of the `TreeListColumnMenuSettings` tag to `true`.

### Column Sections

The TreeList Column Menu lets you group the columns in the [Column Chooser](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/menu#column-chooser) into different sections:

1. Use the `TreeListColumnMenuChooser` tag (child to the `TreeListColumnMenuSettings`).

2. Add the [Template](https://www.telerik.com/blazor-ui/documentation/components/treelist/templates/column-chooser) tag.

3. Provide a `TreeListColumnMenuChooserGroup` which is a collection of the columns that will be in the section. To render a title for the section, use the `Title` parameter.

4. Use the `TreeListColumnMenuChooserItem` to denote the columns that belong to the group.

   * You must set the `ColumnId` parameter of the `TreeListColumnMenuChooserItem` to the value of the `Id` parameter of the corresponding TreeList Column.

   * If you set the `Title` parameter of the `TreeListColumnMenuChooserItem`, it will override the value of the `Title` parameter of the corresponding TreeList Column.

## Example

The example shows the following things:

* A custom `TreeListColumnChooser`
* How to use the `TreeListColumnMenuSettings` tag to control the features of the Column Menu.
* How to use column parameters to affect the column's relationship with the column menu.

<demo metaUrl="client/treelist/columns/menu/example-2/" height="720"></demo>

## Notes

* Settings applied to a TreeList column take precedence over the settings applied to the Column Menu through the `<TreeListColumnMenuSettings>` tag. For example, if you set `Filterable="false"` to a TreeList column and `Filterable="true"` to a TreeList Column Menu, the filtering functionality will be disabled.

* When using the [Column Chooser Template](https://www.telerik.com/blazor-ui/documentation/components/treelist/templates/column-chooser) or grouping the columns into [sections](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/menu#column-sections), add the `Title` parameter to all TreeList Columns.

## See Also

* [Live Demo: TreeList Column Menu](https://demos.telerik.com/blazor-ui/treelist/column-menu)
* [Live Demo: TreeList Custom Column Menu](https://demos.telerik.com/blazor-ui/treelist/custom-column-menu)
