KB Article T902854
Visible to All Users

Grid Control - How to implement the pagination functionality

Question:
I use your WinForms Grid Control and need to implement pagination. I need it since there are many records in the underlying database and I wish to implement a web inspired UI to avoid the necessity of scrolling the Grid. Is this a suitable solution?

Answer:
While Grid Control doesn't natively support pagination, it's possible to implement it. The solution depends on your requirements.

  1. If your main requirement is to avoid the necessity of scrolling the Grid or you wish to implement a pager, use one of the following approaches:

  2. If you are looking for a way to avoid fetching all records at once and it's enough to load data by small portions in your scenario use one of the following approaches:

We would also be happy to hear any feedback. Feel free to leave a comment below and describe your complete scenario. It will make it clear for us why using pagination is vital in your particular case.

Also, see our quick-reference guide - it contains cheat sheets, best practices, and troubleshooting sections:
DevExpress WinForms Cheat Sheets

Search keywords:
Pagination, paging, page, pager, GridControl, Grid Control, Data Grid, WinForms, .NET

Comments (2)

    Is there an option for simply "local data paging" - this must be the simplest but I can't see it mentioned
    I want to load all the data, so I definitely don't want to use VirtualServerModeSource or SQL feature and that also rules out all of option #2 above.

    So I was looking just for is exactly what this javascript grid does - local pagination - and the performance does make a difference so I'm figuring this is worth doing in WinForms.
    https://tabulator.info/docs/5.4/page#main-contents

    Sasha (DevExpress Support) 2 years ago

      Hello,

      To avoid mixing multiple questions in one thread, I created a separate ticket on your behalf: Grid Control - Is there a build in pagination functionality. I will address it shortly.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.