[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Collapse]Windows 10 App Controls
  Prerequisites
 [Expand]Getting Started
 [Collapse]Controls
  [Expand]Navigation and Layout
  [Expand]Data Editors
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Binding to Data
   [Expand]Data Management
   [Expand]Data Editing
   [Expand]Validation
   [Collapse]Asynchronous Virtual Source
     Virtual Source Limitations
   [Expand]Data Scrolling
   [Expand]Visual Elements
   [Expand]Examples
  [Expand]Charts
  [Expand]Map Control
  [Expand]Gauges
  [Expand]PDF Viewer
  [Expand]Scheduler
   SVG Icon
   Context Menu
 [Expand]Themes and Color Schemes
  Localization
  Get More Help
 [Expand]API Reference
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Asynchronous Virtual Source

Expanded Overview

The InfiniteAsyncSource (see DevExpress.Data.InfiniteAsyncSource) is an asynchronous virtual source that allows you to bind the GridControl (see GridControl) to any data source even if the total record count is unknown. You can create solutions that remain responsive to end-user actions regardless of the demands placed upon the Grid. Whenever you work with a large dataset, InfiniteAsyncSource fetches and processes data on-demand, in a background thread. This ensures that the Grid does not freeze during data-intensive operations.

Use the InfiniteAsyncSource (see DevExpress.Data.InfiniteAsyncSource) in the following cases:

  1. A data source supports asynchrony (for example, .NET MongoDB Driver provides methods to perform multiple requests at the same time).
  2. You can create a new data access object (for example, DbContext) for every request.

The Virtual Source Limitations topic lists features that are not available or require additional actions to be enabled.

The Binding to InfiniteAsyncSource tutorial describes how to use the InfiniteAsyncSource (see DevExpress.Data.InfiniteAsyncSource).

Expanded Workflow

The InfiniteAsyncSource (see DevExpress.Data.InfiniteAsyncSource) raises events in the UI Thread and processes data in parallel working threads. You have to provide tasks to these events to obtain summaries, rows, etc.

The image below illustrates the workflow.

  1. The virtual source raises the DevExpress.Data.InfiniteAsyncSource.GetTotalSummaries event. Handle this event and process summaries if you want to show them in the GridControl (see GridControl).
  2. The virtual source raises the DevExpress.Data.InfiniteAsyncSource.FetchRows event to get the first portion of data.
  3. When end-users scroll the grid, the virtual source raises the DevExpress.Data.InfiniteAsyncSource.FetchRows event to get the next portion of data.
  4. When end-users apply a filter, the virtual source raises the DevExpress.Data.InfiniteAsyncSource.GetUniqueValues event to get unique values and show them in a drop-down filter.

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