# Styling or content mixed-up on scrolling

**PROBLEM**

**Scenario 1**

You have applied a Style for the GridViewCell or GridViewRow element. Then:

1. Scroll so the first visual elements are out of view

2. Scroll back to top of the GridView

3. You will notice that the styles have mixed up

**Scenario 2**

You have applied a Template or set a Value for the GridViewCell element. Then:

1. Scroll so the first visual elements are out of view

2. Scroll back to top of the GridView

3. You will notice that the cells' contents have mixed up

**Scenario 3**

Your Bindings are relying on RelativeSource or ElementName sources.

**Scenario 4**

You are creating a binding to GridViewCell.Value inside a DataTemplate.

**CAUSE**

Such problems are usually caused by directly working with the values of the rows/cells. Generally it is not a good practice to work with the visual elements of RadGridView as when the virtualization is enabled, then its rows and cells are reused. RadGridView uses same cells to display different values and your binding fails to update.

Please note that it is enabled by default. You may find more information about **UI Virtualization** in this [help article](https://www.telerik.com/products/wpf/documentation/controls/radgridview/features/ui-virtualization).

**SOLUTION**

Use [CellStyleSelector](https://www.telerik.com/products/wpf/documentation/controls/radgridview/style-selectors/cell-style-selector) to set the style for the Cells and [RowStyleSelector](https://www.telerik.com/products/wpf/documentation/controls/radgridview/style-selectors/rowstyleselector) to set styles for the Rows

## See Also

* [Getting Started with RadGridView](https://www.telerik.com/products/wpf/documentation/controls/radgridview/getting-started/getting-started2)

* [UI Virtualization](https://www.telerik.com/products/wpf/documentation/controls/radgridview/features/ui-virtualization)
