Back to Devexpress

PagedAsyncSource.FetchPage Event

wpf-devexpress-dot-xpf-dot-data-dot-pagedasyncsource-5d063e48.md

latest5.9 KB
Original Source

PagedAsyncSource.FetchPage Event

Allows you to fetch page rows.

Namespace : DevExpress.Xpf.Data

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public event EventHandler<FetchPageAsyncEventArgs> FetchPage
vb
Public Event FetchPage As EventHandler(Of FetchPageAsyncEventArgs)

Event Data

The FetchPage event's data class is FetchPageAsyncEventArgs. The following properties provide information specific to this event:

PropertyDescription
FilterGets the GridControl filtering. Inherited from FetchEventArgsBase.
KeysGets keys that you passed to the ReloadRows(Object[]) method.
ResultGets or sets the result of the fetch page operation.
SkipGets the number of rows to skip in a returned result set. Inherited from FetchEventArgsBase.
SkipTokenGets the skip token. Inherited from FetchEventArgsBase.
SortOrderGets the GridControl‘s sorting. Inherited from FetchEventArgsBase.
TakeGets the number of rows to take in a returned result set. Inherited from FetchPageEventArgsBase.

Remarks

View Example: How to Bind to PagedAsyncSource

If you want to maintain a clean MVVM pattern and specify a fetch operation in a ViewModel, create a command and bind it to the PagedAsyncSource.FetchPageCommand property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the FetchPage event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

how-to-bind-wpf-grid-to-data/CS/CodeBehind/EFCore/PagedAsyncSource/MainWindow.xaml.cs#L21

csharp
};
source.FetchPage += OnFetchPage;
source.GetTotalSummaries += OnGetTotalSummaries;

wpf-data-grid-implement-crud-operations/CS/CodeBehind/EFCore/PagedAsyncSource/MainWindow.xaml.cs#L21

csharp
};
source.FetchPage += OnFetchPage;
source.GetTotalSummaries += OnGetTotalSummaries;

wpf-data-grid-bind-to-pagedasyncsource/CS/PagedAsyncSourceSample/MainWindow.xaml.cs#L22

csharp
source.FetchPage += (o, e) => {
    e.Result = FetchRowsAsync(e);

wpf-data-grid-use-skip-tokens-to-optimize-paging/CS/MainWindow.xaml.cs#L21

csharp
};
source.FetchPage += (o, e) => {
    e.Result = FetchRowsAsync(e);

how-to-bind-wpf-grid-to-data/VB/CodeBehind/EFCore/PagedAsyncSource/MainWindow.xaml.vb#L18

vb
}
AddHandler source.FetchPage, AddressOf OnFetchPage
AddHandler source.GetTotalSummaries, AddressOf OnGetTotalSummaries

wpf-data-grid-bind-to-pagedasyncsource/VB/PagedAsyncSourceSample/MainWindow.xaml.vb#L18

vb
AddHandler Unloaded, Sub(o, e) source.Dispose()
AddHandler source.FetchPage, Sub(o, e) e.Result = FetchRowsAsync(e)
AddHandler source.GetUniqueValues, Sub(o, e)

wpf-data-grid-use-skip-tokens-to-optimize-paging/VB/MainWindow.xaml.vb#L16

vb
AddHandler Unloaded, Sub(o, e) source.Dispose()
AddHandler source.FetchPage, Sub(o, e) e.Result = FetchRowsAsync(e)
Me.grid.ItemsSource = source

See Also

PagedAsyncSource Class

PagedAsyncSource Members

DevExpress.Xpf.Data Namespace