Version

Please note that this control has been retired and is now obsolete to the XamDataGrid control, and as such, we recommend migrating to that control. It will not be receiving any new features, bug fixes, or support going forward. For help or questions on migrating your codebase to the XamDataGrid, please contact support.

Improving Horizontal Scrolling Using CellControlGenerationMode Property

Topic Overview

Purpose

This topic describes how the horizontal scrolling can be improved if many columns are displayed in the xamGrid™ control.

Required background

The following topic is a prerequisite to understanding this topic:

Topic Purpose

This topic describes the virtualization in the xamGrid control.

In this topic

This topic contains the following sections:

Configuring Smooth Horizontal Scrolling

Overview

It is essential for the virtualization process that the visual elements are only created when they are in view in the xamGrid control.

By default, a CellControl instance is created when a cell comes into view and this instance is used only for this particular cell and it is never recycled. The same behavior is achieved if the CellControlGenerationMode is set to Virtualize.

If the CellControlGenerationMode is set to Recycle, the CellControl instances are recycled and reused by the cells in the same row when a horizontal scrolling is performed.

Property settings

The following table maps the desired configuration to the property settings that manage it.

In order to: Use this property: And set it to:

Recycle and reuse the CellControl instances by the cells in the same row when scrolling.

Example

Following is the code that implements this example.

In XAML:

<ig:XamGrid x:Name="dataGrid" ItemsSource="{Binding Path=Customers}" CellControlGenerationMode="Recycle" />

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic describes how to control the virtualization process in the xamGrid control.