<ig:XamGrid x:Name="dataGrid" ItemsSource="{Binding Path=Customers}" CellControlGenerationMode="Recycle" />
We recommend that you use the xamDataGrid control instead of the xamGrid control. The xamGrid is being planned for retirement over the next few years and will not receive any new features. We will continue to provide support and critical bug fixes for the xamGrid during this time. For help or questions on migrating your codebase to the xamDataGrid, please contact support.
This topic describes how the horizontal scrolling can be improved if many columns are displayed in the xamGrid™ control.
The following topic is a prerequisite to understanding this topic:
This topic contains the following sections:
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.
The following table maps the desired configuration to the property settings that manage it.
Following is the code that implements this example.
In XAML:
<ig:XamGrid x:Name="dataGrid" ItemsSource="{Binding Path=Customers}" CellControlGenerationMode="Recycle" />
The following topics provide additional information related to this topic.