Skip to main content

Overview

TRowGroup is a comprehensive grid band class that paints headers, cell rows, and footers. It provides the main grid functionality including data binding, column management, selection, scrolling, and editing. It supports hierarchical master-detail structures through sub-grids.

Key Properties

TColumns
Collection of columns displayed in the grid. Each column defines how data is displayed and formatted.
TRows
The rows band that displays data cells. Contains all row-related properties like height, spacing, and data source.
TColumnHeaderBand
The header band that displays column headers. Controls the appearance and behavior of the column header row.
TGridBands
Collection of additional header bands. Allows multiple header rows above the main header.
Collection of footer bands. Allows adding footer rows below the data rows.
TIndicator
Special column displayed as the leftmost column showing row state indicators (browse, edit, insert).
TGridSelection
Selection properties defining which cells or rows are selected and how they appear.
TTextRender
Default text rendering properties for all cells. Defines font, alignment, and formatting.
Boolean
default:"false"
Controls whether the entire grid is read-only. When true, no cells can be edited.
TGridScrolling
Scrolling configuration for mouse and touch interactions.
TMargins
Edge spacing around the entire grid content.
TVirtualData
The virtual data source bound to this grid. Provides the data displayed in rows.
TRowGroup
Reference to the currently active row group (for master-detail scenarios).

Key Methods

TRectF
Returns the rectangle coordinates of the specified cell.
Calculates and sets column widths based on content. Use Forced = True to recalculate all columns.
Prepares columns for painting by calculating positions and widths.
Boolean
Returns true if cell editing can be started in the current context.
Boolean
Returns true if the specified column can be edited (considering ReadOnly flags).
Boolean
Tests if a point (X, Y) hits a render element in the specified cell.
Boolean
Returns true if the point (X, Y) is within the selected cell or range.
Boolean
Toggles the visibility of detail (sub-grid) for the specified row. Used in master-detail scenarios.
TExpanderRender
Creates a new expander render instance for master-detail functionality.
Automatically scrolls the grid to make the selected cell visible.
Attempts to select the first selectable column.
Single
Returns the maximum bottom Y coordinate of all grid content.
Refreshes the grid with new or updated data source.

Interaction Methods

Boolean
Handles mouse events (move, click, double-click, wheel). Returns true if the event was handled.
Handles keyboard events for navigation and editing.

Events

TNewDetailEvent
Event triggered when a new detail (sub-grid) is created for master-detail functionality.
TNotifyEvent
Event triggered when the selected cell changes.

Usage Examples

Basic Grid Setup

Master-Detail Grid

Cell Selection

Scrolling Configuration

Custom Headers and Footers

Read-Only Grid

Auto-Sizing Columns

Scrolling Modes

The TGridScrolling class provides several scrolling modes:
Scrolling only works with finger-touch gestures.

Scroll Directions

  • Normal: Standard scrolling behavior
  • Inverted: Reverse scrolling direction
  • Disabled: Scrolling disabled for that axis