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
FromUnit_Custom_Bands.pas:
Footer Options
Floating Footer
Footer Visibility
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
- Use TColumnsBand for column-specific information (units, notes)
- Use TTextBand for general information (titles, summaries)
- Add totals to footer for easy summary viewing
- Style consistently with your application theme
- Position carefully using Index property
Next Steps
- Learn about Themes for consistent styling
- Explore Master-Detail with band totals
- See Database Grid for data binding
