Blog
All Blog Posts | Next Post | Previous Post
Next Generation Data Grid for Delphi: Paging (BETA)
Today
TMS FNC UI Pack 6.9 BETA
Intro
Working with large datasets can be challenging. When your grid contains thousands or even millions of rows, displaying them all at once isn't just impracticalit can bring your application to a crawl. That's where the built-in paging functionality in TTMSFNCDataGrid comes to the rescue, providing a powerful yet simple way to split data into manageable chunks while maintaining excellent performance.
Why Paging Matters
When building data-driven applications, you'll often encounter scenarios where displaying all data at once simply isn't feasible:
✅ Improved Performance: Only render visible rows, dramatically reducing memory usage and rendering time
✅ Better User Experience: Users can navigate through data intuitively without overwhelming scrollbars
✅ Reduced Load Times: Fetch and display data in chunks rather than loading everything upfront
✅ Professional Appearance: Give your application a polished, enterprise-ready look with built-in navigation controls
Quick Start: Enabling Paging
Getting started with paging is remarkably simple. Here's the minimal code needed to enable paging in your grid:
procedure TForm1.SetupBasicPaging; begin // Enable paging Grid.Paging := True; // Make footer visible to show paging controls Grid.Footer.Visible := True; Grid.Footer.Paging.Visible := True; end;
That's it! With just three lines of code, your grid now automatically splits data into pages and displays navigation controls in the footer.
The Paging Interface
When paging is enabled, TTMSFNCDataGrid provides a comprehensive set of navigation controls in the footer:
Navigation Buttons
- First Page: Jump to the beginning
- Previous Page: Move backward one page
- Next Page: Advance forward one page
- Last Page: Jump to the end
Page Selector A dropdown combobox displaying all available pages, allowing users to jump directly to any page.
Page Information A text display showing current position (e.g., "Page 3 of 15").
Customizing the Paging Experience
The default paging controls look great out of the box, but you can customize virtually every aspect to match your application's design:
procedure TForm1.CustomizePagingControls; begin // Configure paging control appearance Grid.Footer.Paging.Size := 35; // Height of paging area // Control which elements are visible Grid.Footer.Paging.ShowPageSelector := True; Grid.Footer.Paging.ShowPageInfo := True; Grid.Footer.Paging.ShowNavigationButtons := True; // Customize control widths Grid.Footer.Paging.PageSelectorWidth := 120; Grid.Footer.Paging.NavigationButtonWidth := 30; Grid.Footer.Paging.PageInfoWidth := 180; end;
Programmatic Navigation
While the visual controls are convenient for users, you'll often need to navigate pages programmatically. TTMSFNCDataGrid provides a rich API for this:
// Basic navigation Grid.FirstPage; // Go to first page Grid.LastPage; // Go to last page Grid.NextPage; // Move forward one page Grid.PreviousPage; // Move backward one page // Direct page access Grid.GoToPage(5); // Jump to page 6 (0-based index) Grid.PageIndex := 3; // Alternative: set page directly // Query current state ShowMessage(Format('Currently on page %d of %d', [Grid.PageIndex + 1, Grid.PageCount]));
Responding to Page Changes
To create a responsive application, you'll want to react when users navigate between pages. The grid provides several events for this:
procedure TForm1.GridPageChanged(Sender: TObject; AOldPageIndex, ANewPageIndex: Integer); begin // Update status bar StatusBar.Panels[0].Text := Format('Viewing page %d of %d', [ANewPageIndex + 1, Grid.PageCount]); // Log navigation for analytics LogPageView(ANewPageIndex); // Update related UI elements UpdateDataSummary; end;
Installing the Latest Beta Version
Want to try out the latest paging features before they're officially released? Here's how to install a beta version using TMS Smart Setup:
Step 1: Download the Beta Package
Download the beta zip file from your account.
Step 2: Extract to the Correct Location
Navigate to your TMS Smart Setup installation directory and locate the tms.fnc.uipack
folder. Extract the contents of the beta zip file directly into this folder, replacing existing files when prompted.
Step 3: Rebuild the Package
Open a command prompt (or terminal) in the TMS Smart Setup installation directory and run:
tms.exe build -full
This command rebuilds the entire TMS FNC UI Pack with the beta updates. The process may take a few minutes.
Step 4: Restart Your IDE
Close and restart Delphi or C++Builder. The beta version is now installed and ready to use!
Note: Beta versions may contain experimental features. Always test thoroughly before deploying to production environments.
Take Your Data Grid to the Next Level
Whether you're building a simple data browser or a complex enterprise application, paging is an essential feature for managing large datasets effectively. With TTMSFNCDataGrid's built-in paging support, you get professional-grade functionality without writing complex code.
The combination of automatic page management, customizable UI controls, and a rich programmatic API makes it trivial to add pagination to your applicationsand your users will thank you for the improved performance and usability.
Ready to enhance your data grids with powerful paging capabilities?
TTMSFNCDataGrid is part of the TMS FNC UI Pack, available for Delphi and C++Builder.
Pieter Scheldeman
Related Blog Posts
-
Next Generation Data Grid for Delphi: Getting Started
-
Next Generation Data Grid for Delphi: Adding, Formatting & Converting Data
-
Next Generation Data Grid for Delphi: Filtering & Sorting
-
Next Generation Data Grid for Delphi: Grouping
-
Next Generation Data Grid for Delphi: Webinar Replay Available!
-
Next Generation Data Grid for Delphi: Cell Controls
-
Next Generation Data Grid for Delphi: Master-Detail
-
Next Generation Data Grid for Delphi: Calculations
-
Next Generation Data Grid for Delphi: Import & Export
-
Next Generation Data Grid for Delphi: Template
-
Next Generation Data Grid for Delphi: Filter Row
-
Next Generation Data Grid for C++: Getting Started
-
Freebie Friday: Next Generation Grid Quick Sample Data
-
Next Generation Data Grid for Delphi: Columns Editor
-
Next Generation Data Grid for Delphi: File Drag & Drop
-
Next Generation Data Grid for Delphi: Visual Grouping
-
Next Generation Data Grid for Delphi: FMX Linux Support
-
Next Generation Data Grid for Delphi: Header & Footer Buttons
-
Next Generation Data Grid for Delphi: Paging (BETA)

This blog post has not received any comments yet.
All Blog Posts | Next Post | Previous Post