DXGrid can operate on any in-memory IEnumerable data sources using Parallel LINQ (PLINQ), improving performance for data-intensive operations (e.g. sorting, grouping, filtering, summary calculation, etc.) by making full use of all the available processors/cores on the system.
There are two PLINQ data sources each designed to address a specific data-processing mode (synchronous and asynchronous) – PLinqServerModeDataSource and PLinqInstantFeedbackDataSource respectively. To make it easier for you to access and use them at design-time, both data sources are presented in a WPF Designer Toolbox. Note that these are non-visual components for WPF.
To support Parallel LINQ, you should specify the source collection for a PLINQ data source and bind it to the grid. The source collection must implement IEnumerable<T>. You should not provide the exact type of its elements, because the type is automatically evaluated at runtime.
Three ways to specify the source collection:
Xaml |
<dx:PLinqInstantFeedbackDataSource Name="pLinqInstantSource" ListSource="{Binding Path=DataContext.ListSource}" />
<dxg:GridControl Name="grid" ItemsSource="{Binding ElementName=pLinqInstantSource, Path=Data}">
|
When using PLinqInstantFeedbackDataSource, the source collection can be dynamically populated by the IListSource.GetList() method or within the PLinqInstantFeedbackDataSource.GetEnumerable event handler. Data objects are loaded in a separate thread, allowing you to perform time-consuming operations (e.g. dynamically create large volumes of data) without UI freezing. In these instances, you need to ensure thread safety yourself.
Example: How to: Parallelize Data-Intensive Operations On In-Memory Data in Instant Feedback UI Mode

See Also