Skip to main content

Overview

Bands are custom rows that appear in the grid’s header or footer areas. They can display static text, column-specific information, totals, or any custom content.

Basic Band Creation

Text Band

The simplest band type displays static text:

Columns Band

Display custom text for each column:

Complete Example

From Unit_Custom_Bands.pas:

Advanced Bands

Totals Band

Display calculated totals for columns:

Available Calculations

Multi-Line Text Bands

Styled Bands

Gradient Background

Border and Stroke

Managing Multiple Bands

Adding Multiple Bands

Removing Bands

Band Positioning

Interactive Grid Editor

TeeGrid includes a visual editor for bands:

Embedded Editor

Use Cases

Unit Labels

Summary Information

Column Grouping

Key Concepts

Band Types

  • TTextBand: Static text spanning all columns
  • TColumnsBand: Different text per column
  • TColumnTotals: Calculated column totals
  • TTotalsHeader: Label for totals band

Collections

  • TeeGrid1.Headers: Bands above the grid
  • TeeGrid1.Footer: Bands below the grid
  • NewGroup.Header: Bands for detail grids (master-detail)
  • NewGroup.Footer: Footer for detail grids

Features Demonstrated

  • Creating text and column bands
  • Styling bands with colors, fonts, gradients
  • Adding totals calculations
  • Managing multiple bands
  • Using the visual band editor
  • Floating footer behavior

Best Practices

  1. Use TColumnsBand for column-specific information (units, notes)
  2. Use TTextBand for general information (titles, summaries)
  3. Add totals to footer for easy summary viewing
  4. Style consistently with your application theme
  5. Position carefully using Index property

Next Steps