Paging in WinForms GridGrouping with Filter Support


Figure 1: Paging workflow in the GridGrouping control


When a large number of records is displayed in a grid, the records can be listed on many different pages. This typically means that a filter can only be applied to one page of records at a time.

However, there is a way filters can be applied to entire sets of records that span multiple pages using the Windows Forms GridGrouping control regardless of whether paging is enabled.

The Pager helper enables this by wiring the respective grid (GridGroupingControl) to its bound source (DataTable).

About Pager

Pager extracts the specific page from the bound data source and binds it to the GridGrouping control. With this specific feature, one may encounter a filtering restriction. This occurs because a grid can only control the records in the page bound to it, not all of the records in the bound data source. However, this limitation can be overcome through the engine by allowing it to handle the filtering separately. This can be done by wiring the respective view to the grid through a temporary table.



Figure 2: Paging-enabled GridGrouping control with 100 pages, each holding 1000 records (100,000 records in total)


How to wire?

The Pager can be wired to the GridGrouping control through the following settings:


The link below takes you to a sample that illustrates paging support in the GridGrouping control for a data table populated with 100,000 records.

Share this post:

Leave a comment