Skip to main content

Overview

TRows is a grid band class that paints multiple rows of column cells. It includes support for hierarchical “rows-inside-rows” through the Children property, enabling master-detail row structures.

Key Properties

TCoordinate
Default height for all rows in pixels. Individual row heights can be overridden using the Heights property.
Single
Individual height for a specific row. Allows different rows to have different heights.
TCoordinate
Vertical spacing between rows in pixels.
TFormat
Background formatting for all rows. Defines the default background color, gradient, and other visual properties.
TAlternateFormat
Formatting properties for odd-numbered rows. Enables alternating row colors for better readability.
TStroke
Stroke properties for horizontal lines between rows.
TCellHover
Selection and formatting properties for the cell under the mouse cursor.
TVirtualData
The data source for the rows. Must be assigned to display data in the grid.
TRowsBands
Collection of optional sub-rows for each row. Enables hierarchical row structures.
TRowsBands
Collection of additional bands that can be displayed for each row.
TVisibleColumns
Internal property containing an array of all visible columns. Used for rendering.
Single
Calculated vertical spacing value used internally for rendering.

Key Methods

Single
Returns the height of the specified row, taking into account custom heights or the default height.
Single
Returns the Y coordinate of the top edge of the specified row.
Single
Returns the Y coordinate of the bottom edge of the specified row.
Integer
Returns the row index at the specified Y coordinate, or -1 if no row is found.
Integer
Returns the index of the first visible row, optionally offset by the specified amount.
Single
Calculates the automatic height for the specified row based on cell content.
Boolean
Returns true if all rows have the same height.
Boolean
Returns true if there are no rows to display (data is empty).
Single
Returns the Y coordinate of the bottom of the last row.
Calculates and sets the default row height based on font size and cell formatting.
Clears all row-specific data and resets to initial state.
Swaps two rows at the specified indices.

Usage Examples

Basic Row Configuration

Alternating Row Colors

Custom Row Heights

Auto-Height Rows

Row Hover Effect

Finding Rows

Hierarchical Rows

Scrolling

The TRows class includes scroll support: