Skip to content

Files

Latest commit

author
DevExpressExampleBot
May 5, 2022
bd9ac0c · May 5, 2022

History

History
42 lines (30 loc) · 3.15 KB

File metadata and controls

42 lines (30 loc) · 3.15 KB

How to bind the Data Grid to a strongly typed collection loaded asynchronously

The Data Grid was moved to maintenance support mode. No new features/capabilities will be added to this component. We recommend that you migrate to the Grid component.

You can bind the Data Grid component to a collection that is loaded synchronously or asynchronously.

Data Grid: Data Binding Main Page

In this example, there are four options that allow you to bind the DxDataGrid to an asynchronously loaded collection:

  • Data Property
    Assigns a strongly typed collection to the Data property and uses an asynchronous task to initialize the collection. The Data Grid page is rendered twice.
  • DataAsync Property
    Uses the DataAsync property to load a strongly typed collection asynchronously and specifies a key data field to identify a data source instance.
  • DataAsync: Cancellation Token
    Uses the DataAsync property to load a data collection asynchronously and processes a cancellation token to prevent further execution for the disposed Data Grid.
  • DataAsync: Cache
    Caches the DataAsync function. We recommend that you use this approach if the function is time- or resource-consuming.

Files to Look At

Documentation

More Examples