# Locked Columns

Locked (frozen) columns remain visible at all times while the user scrolls the [Angular TreeList](https://www.telerik.com/kendo-angular-ui-develop/components/treelist) horizontally.

## Prerequisites

To allow the component to adjust the layout of its frozen and non-frozen columns and for the feature to work properly, make sure that:

* Scrolling is enabled.
* The [`height`](https://www.telerik.com/kendo-angular-ui-develop/components/treelist/api/treelistcomponent#height) option of the TreeList is set.
* The widths of all TreeList columns are explicitly set in pixels so that the TreeList is able to adjust the layout of the locked and unlocked columns.
* The total width of the locked columns does not exceed the width of the available viewport or the width of the TreeList, if `width` is explicitly set.

## Setup

The TreeList supports locked columns on the left side of the table (or on the right side when the TreeList is in RTL mode).

The following example demonstrates how to lock columns in the TreeList.

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

## Known Limitations

* When you lock columns in the TreeList, leave at least one unlocked column. If you need to hide all non-locked columns, unlock one of the locked columns before you hide the last non-locked column.
* Touch-scrolling locked columns is not possible because they are wrapped in a container with the `overflow:hidden` style. To work around this limitation on desktop devices, use the `wheel` event. Currently, the TreeList does not support a workaround for touch devices.
* Individual child columns within a [`<kendo-treelist-column-group>`](https://www.telerik.com/kendo-angular-ui-develop/components/treelist/api/columngroupcomponent) cannot be locked independently. The locked state must be applied to the entire column group as a single unit.

## Suggested Links

* [`ColumnComponent`](https://www.telerik.com/kendo-angular-ui-develop/components/treelist/api/columncomponent)
* [API Reference of the `TreeListComponent`](https://www.telerik.com/kendo-angular-ui-develop/components/treelist/api/treelistcomponent)
* [API Index of the TreeList](https://www.telerik.com/kendo-angular-ui-develop/components/treelist/api)
