# UI Virtualization

**RadGridView's API** supports **UI Virtualization** which processes only these visual elements that are loaded in its viewable area. This reduces the memory footprint of the application and speeds up the loading time, thus immensely enhancing the **UI performance**.

The grid control utilizes **horizontal** and **vertical** virtualization and introduces container recycling for speed improvement and reduction in memory usage. This is of great importance when the control is bound to large data sets. The container recycling pushes further the speed of horizontal and vertical scrolling, allowing **RadGridView** to reuse the existing containers for the different data items from the source collection instead of creating new ones.

During mouse-wheel scrolling, the virtualizing panel updates the visible range and can reuse the row and cell containers as the view changes. Do not use container recreation or scrolling as an indication that keyboard focus has moved to the grid.

> important You should **not work** with the visual elements of **RadGridView**(GridViewCell, GridViewRow, etc.) directly as this will result in inconsistent behavior due to the containers recycling mechanism. Instead, you should use the underlying data items as explained in the [Style Selectors](https://www.telerik.com/products/wpf/documentation/controls/radgridview/style-selectors/cell-style-selector) section.

These techniques, combined with the outstanding LINQ-based data engine, guarantee fast performance.

> tip Both **EnableColumnVirtualization** and **EnableRowVirtualization** properties of **RadGridView** are set to **True** by default.

> In case the **UI Virtualization** is disabled, then all the visual elements will be loaded once **RadGridView** is visualized and its items are populated. This can lead to huge performance issues and additional loading time. Disabling the virtualization is **highly** not recommended.

> important **Do not** place RadGridView in controls/panels which will measure it with infinity as this will disable the **UI Virtualization**. For example, **ScrollViewer**, **StackPanel** and **Grid** with **Row\.Height=Auto** or **Column.Width=Auto** will measure it in that way. You can place it in RowDefinition with Height="\*" instead.

You can check the topic on [Styling or content mixed-up on scrolling](https://www.telerik.com/products/wpf/documentation/controls/radgridview/troubleshooting/style-disappears-scrolling) on some issues with styling the visual elements.

## See Also

* [Performance Tips and Tricks](https://www.telerik.com/products/wpf/documentation/controls/radgridview/performance-tips-tricks)
* [Styling or content mixed-up on scrolling](https://www.telerik.com/products/wpf/documentation/controls/radgridview/troubleshooting/style-disappears-scrolling)
