[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Implementation Details
   [Expand]Views
   [Expand]Grid View Data Layout
   [Collapse]Binding to Data
     Binding to Data Overview
     Binding to ICollectionView
    [Collapse]Server Mode
      Server Mode Overview
      Entity Framework 4.0+ Server Mode
      LINQ Server Mode
      Binding to In-Memory Data Using PLINQ
      Server Mode Limitations
      Instant Feedback UI Mode
    [Expand]Binding to any Data Source with Virtual Sources
    [Expand]TreeListView Data Binding
     Applying Data Annotations
     Unbound Columns
     Posting Data to a Connected Database
     Managing Multi-Thread Data Updates
   [Expand]Master-Detail Data Representation
   [Expand]Data Editing and Validation
   [Expand]Grouping
   [Expand]Selection
   [Expand]Filtering and Searching
   [Expand]Sorting
   [Expand]Data Summaries
   [Expand]Paging and Scrolling
   [Expand]Focus and Navigation
   [Expand]Conditional Formatting
   [Expand]Drag-and-Drop
   [Expand]Appearance Customization
   [Expand]MVVM Enhancements
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]Miscellaneous
   [Expand]Performance Improvement
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]End-User Capabilities
   [Expand]Examples
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Binding to In-Memory Data Using PLINQ

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:

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.

Note

The PLinqInstantFeedbackDataSource must be disposed of to terminate the processing thread and release all the resources that it owns. This can be done either by calling its PLinqInstantFeedbackDataSource.Dispose method or by executing PLinqInstantFeedbackDataSource.DisposeCommand. For instance, you can execute this command in an MVVM-friendly manner using EventTrigger after a window has been closed (see the example below).

Example: How to: Parallelize Data-Intensive Operations On In-Memory Data in Instant Feedback UI Mode

Expanded See Also

Is this topic helpful?​​​​​​​