PagedAsyncSource Class

A virtual source component that allows you to bind the GridControl to a data source and display data in pages.

Namespace: DevExpress.Xpf.Data

Assembly: DevExpress.Xpf.Core.v21.2.dll

Declaration

public sealed class PagedAsyncSource :
    PagedSourceBase

Remarks

VirtualSourcesPagedAsync

Run Demo: Paged Source

View Example: How to Bind to PagedAsyncSource

Read Tutorial: How to Use Virtual Sources Read Tutorial: How to Bind to a Custom Service with Restrictions

Workflow

The PagedAsyncSource raises events in the UI Thread and uses tasks to process data in parallel Working Threads. You should provide tasks to these events to obtain summaries, rows, etc. Then the UI Thread gets data you fetched.

  1. (Optional step) The PagedAsyncSource raises the PagedAsyncSource.GetTotalSummaries event. Handle this event and process summaries if you want to show them in the GridControl.
  2. The PagedAsyncSource raises the PagedAsyncSource.FetchPage event to get the first portion of data.
  3. When end users navigate to the next page, the PagedAsyncSource raises the PagedAsyncSource.FetchPage event to get the next portion of data.
  4. (Optional step) When end users apply a filter, the PagedAsyncSource raises the PagedAsyncSource.GetUniqueValues event to get unique values and show them in a drop-down filter.

You can maintain a clean MVVM pattern and specify operations above in a ViewModel. To do this, create a command and bind it to the corresponding property:

Event Property Description
GetTotalSummaries GetTotalSummariesCommand Gets or sets a command that allows you to get total summaries.
FetchPage FetchPageCommand Gets or sets a command that allows you to fetch page rows.
GetUniqueValues GetUniqueValuesCommand Gets or sets a command that allows you to get unique values.
See Also