# Virtualized Columns

The Telerik Blazor TreeList provides Virtual Scrolling for its Columns. This means that columns and the corresponding data will be rendered only for the currently visible viewport. When changing the [Page](https://www.telerik.com/blazor-ui/documentation/components/treelist/paging), [filtering](https://www.telerik.com/blazor-ui/documentation/components/treelist/filter/overview) or [Sorting](https://www.telerik.com/blazor-ui/documentation/components/treelist/sorting) the treelist, fewer elements are rendered which improves the responsiveness and the overall user experience.

This article provides the following sections:

* [Basics](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/virtual#basics)
* [Notes](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/virtual#notes)
* [Limitations](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/virtual#limitations)
* [More Examples](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/virtual#more-examples)
  * [Virtualized Autogenerated Columns](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/virtual#virtualized-autogenerated-columns)

## Basics

The targeted scenario is for a treelist with big number of columns, since the performance improvement will be most significant there.

To enable Virtualized Columns:

1. Set the `ColumnVirtualization` parameter of the treelist to `true`.

2. Set the `Width` parameter of all columns in `px` so that the total sum is greater than the `Width` of the treelist.
   * This will enable horizontal scrollbar which is required. You can read more about the scrolling behavior of the treelist in the [TreeList Column Width Behavior](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/width) article.



1. Set the `Height` of the treelist in `px`. For more information see the [Notes](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/virtual#notes) section.

2. Set the `Width` parameter of the treelist in `px`.

> caption Basic setup of the Virtualized Columns

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

* scrolling through the treelist is the same as without virtual scrolling, but the rendering performance and responsiveness of all other actions will be improved.

## Notes



* The row must accommodate the height of all the possible cells and their content in order to ensure good appearance. If certain cells that are not rendered have content that is taller than the rendered ones, you may experience glitches and unstable scrolling.

  * The actual cell height can depend on the chosen Theme or other CSS rules, or on cell data that falls on more than one line. Inspect the rendered HTML to make sure you have CSS setting for the rows that matches the rendering, if necessary.

* The `Height` of the treelist must be explicitly set in `px`. By default the Height is set by the browser depending on the contents. When a new column is rendered during horizontal scrolling, it might increase or decrease the vertical size of the row and cause issues with the rendering and abnormal visual behavior for the users.

* Rendering the Virtual Columns in Client-side Blazor Applications is slower due to the Framework rendering limitations. In the Server-side Applications this issue is not present.

## Limitations

The Virtualized Columns are a feature for improving the responsiveness and performance of the treelist in cases when the data model has a lot of properties and the volume of columns is large.

List of known limitations of the Virtualized columns:

* [Frozen](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/frozen) columns are not supported.

## More Examples

### Virtualized Autogenerated Columns

Column virtualization is commonly used when you have many columns. You may not have to declare them yourself, the treelist can do this for you through its [Automatically Generated Columns](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/auto-generated) feature.

> note In order to add Virtualized Autogenerated Columns, the `ColumnWidth` parameter must be set in pixels.

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

## See Also

* [Live demo: Virtual Columns](https://demos.telerik.com/blazor-ui/treelist/column-virtualization)
* [TreeList Column Width Behavior](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/width)
* [Automatically Generated Columns](https://www.telerik.com/blazor-ui/documentation/components/treelist/columns/auto-generated)
