Skip to main content

Overview

This example demonstrates how to create a basic TeeGrid and populate it with simple string data. TeeGrid can display tabular data with minimal setup.

Simple String Grid

The easiest way to get started with TeeGrid is using TStringsData to create a grid with strings:

Key Concepts

Creating Grid Data

The TStringsData class creates a simple string-based grid:
  • Columns and Rows: Specify dimensions in the constructor
  • Headers: Set column headers using the Headers[] property
  • Cell Data: Access cells using Data[Column, Row]

Assigning Data to Grid

Once you’ve created and populated your data object, simply assign it to the grid:
The grid automatically:
  • Creates columns based on the data structure
  • Calculates optimal column widths
  • Sets up scrollbars if needed
  • Enables cell editing

Basic Customization

Column Width

Row Height

Cell Alignment

Features Demonstrated

  • Creating a basic grid with string data
  • Setting column headers
  • Populating cells with data
  • Basic formatting and alignment

Next Steps