Overview
TeeGrid can automatically bind to generic arrays and lists using runtime type information (RTTI). TheTVirtualData<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:Nested Records
TeeGrid automatically expands nested record fields:Array of Classes
Bind arrays of object instances:TList and TObjectList
Bind generic list types: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
Large Arrays
Large Arrays
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
Column Width Calculation
Column Width Calculation
Speed up initial display:
Row Height
Row Height
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
