Back to Devexpress

Data Paging

wpf-120186-controls-and-libraries-data-grid-paging-and-scrolling-data-paging.md

latest4.0 KB
Original Source

Data Paging

  • Jan 09, 2023
  • 2 minutes to read

The GridControl allows you to display its content across multiple pages. End-users can use the built-in pager to navigate through the GridControl’s data:

View Example: Implement Data Paging

Note

The TreeList View does not support data paging.

Enabling Data Paging

Set the GridViewBase.AllowPaging property to true to enable data paging:

xaml
<dxg:GridControl>
    <!---->            
    <dxg:GridControl.View>
        <dxg:TableView AllowPaging="True" />
    </dxg:GridControl.View>
</dxg:GridControl>

The table below describes how Data Paging works depending on the data binding mode:

|

Data Binding Mode

|

How Data Paging Works

| | --- | --- | |

Regular Mode

|

The GridControl loads all data to memory. End-users use the pager to navigate through loaded data.

| |

Server Mode

|

The GridControl loads and displays the first portion of data from the data source and requests subsequent data sections when an end-user navigates to another page.

The GridControl caches data internally. Data is not reloaded when end-users navigate to previous pages.

| |

Virtual Sources

|

The PagedSource and PagedAsyncSource allow you to request data manually. You can obtain the current page’s rows or load all data at once.

The GridControl caches data internally. The PagedAsyncSource.FetchPage and PagedSource.FetchPage events are not invoked when end-users navigate to a previous page.

|

Data Paging Options

The GridControl has the following properties and events to allow you to control data paging manually:

MethodDescription
GridViewBase.PageSizeGets or sets the maximum number of rows that can be displayed on a page.
GridViewBase.CurrentPageIndexGets or sets the index of the current page.
GridViewBase.PageCountGets the number of pages displayed in the GridControl.
GridViewBase.PagerNumericButtonCountGets or sets the maximum number of numeric buttons that can be displayed within the pager control.
GridViewBase.CurrentPageIndexChangingOccurs before the selected page is changed.
GridViewBase.CurrentPageIndexChangedOccurs after the selected page is changed.

Data Paging Limitations

Data paging does not support the following features: