[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
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Implementation Details
   [Expand]Grid View Data Layout
   [Collapse]Binding to Data
     Binding to Data Overview
     Binding to ICollectionView
    [Expand]Server 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]Filtering and Searching
   [Expand]Data Summaries
   [Expand]Paging and Scrolling
   [Expand]Focus and Navigation
   [Expand]Conditional Formatting
   [Expand]Appearance Customization
   [Expand]MVVM Enhancements
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]Performance Improvement
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]End-User Capabilities
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [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
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Managing Multi-Thread Data Updates

In some cases, the GridControl's data needs to be updated in another thread to avoid application freezing (e.g., displaying frequently changed data). This can be done using one of the following solutions.

Expanded BeginDataUpdate/EndDataUpdate methods (recommended)

Wrap data updates inside DataControlBase.BeginDataUpdate/DataControlBase.EndDataUpdate calls.

Suppose that your data is being updated on another thread by a timer. To correctly reflect those changes in the grid, wrap data updates inside DataControlBase.BeginDataUpdate/DataControlBase.EndDataUpdate calls.

When using the MVVM pattern, it is not possible to call a grid's methods directly from the view model. A view model should provide additional events allowing you to force the grid to stop/start listening for data updates before/after asynchronous data modifications. In the example below these events are: OnAsyncProcessingStarted and OnAsyncProcessingCompleted.

Example: How to: Display Data Which is Being Updated on Another Thread

Expanded DisableThreadingProblemsDetection property

You can set the DevExpress.Data.CurrencyDataController.DisableThreadingProblemsDetection property to true to disables cross-thread exceptions and force data updates to be sent to the UIThread.


Setting DevExpress.Data.CurrencyDataController.DisableThreadingProblemsDetection to true will only remove the exception and will not prevent issues related to upgrading the source collection from a separate thread when the GridControl is updating its state. Use this property at your own risk though, as there is no guarantee that the GridControl will always process changes correctly. For example, if you modify a property during the sort operation, the sorting result may no longer be correct.

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