Skip to main content

Overview

TeeGrid can automatically bind to generic arrays and lists using runtime type information (RTTI). The TVirtualData<T> class introspects your records and classes to generate columns automatically.
TeeGrid supports TArray<T>, TList<T>, TObjectList<T>, and even single record/object instances.

Array of Records

The most common pattern — display an array of records:
TVirtualArrayData<T> is just an alias for TVirtualData<TArray<T>> — use whichever reads better.

Nested Records

TeeGrid automatically expands nested record fields:

Array of Classes

Bind arrays of object instances:
Memory Management: When using arrays of classes, you’re responsible for creating and freeing object instances. TeeGrid does not own the objects.

TList and TObjectList

Bind generic list types:
For object lists with automatic cleanup:

Simple Type Arrays

Display arrays of primitive types:

Single Records

Display a single record or object instance:

Visibility Control

Control which fields and properties appear as columns:

Constructor Parameters

Ancestor Classes

Include or exclude inherited members:

2D Arrays (Matrix Data)

Display multi-dimensional arrays:

Custom Cell Editors

Assign custom editor controls for specific columns:

Data Type Support

TeeGrid automatically recognizes and formats:
  • Boolean: Checkbox rendering
  • TDateTime: Date formatting
  • Integer, Int64: Right-aligned numeric formatting
  • Single, Double, Extended: Decimal formatting
  • String: Text rendering
  • Enumerations: Ordinal display

Helper Type Aliases

TeeGrid provides convenient type aliases:

Performance Considerations

For arrays with thousands of items:
  • TeeGrid uses virtual scrolling (only visible rows are rendered)
  • Memory usage scales with array size, not visible rows
  • Consider pagination for very large datasets
Speed up initial display:
Optimize row height for better scrolling:

Complete Example

Here’s a full working example:

Next Steps

DataSet Binding

Connect to TDataSet and TDataSource

String Grids

Use TStringGrid-style string arrays

Custom Data

Create custom TVirtualData implementations

Columns API

Customize column appearance and behavior