Skip to main content
TeeGrid supports customizable headers and footers through the grid bands system. Headers display column names with optional sorting, resizing, and multi-level hierarchies. Footers can show totals, summaries, or custom content.

Grid Header

The grid header is a special band that displays column names and provides user interaction for sorting and resizing columns.

Basic Header Configuration

Header Styling

Column Header Text

Customize individual column headers:

Header Sorting

Enable Sorting

Enable column sorting through header clicks:

Custom Sort Indicators

The header displays sort indicators (arrows) for sorted columns:

Sort State Control

Control and query sort state programmatically:

Multi-Level Headers

Create hierarchical column headers using sub-columns:

Row Lines Between Header Levels

Style the lines separating header levels:

Column Interaction

Column Resizing

Allow users to resize columns by dragging:

Column Dragging

Allow users to reorder columns by dragging:

Hover Effects

Highlight columns on mouse hover:

Selected Column

Highlight the selected column:

Header Margins

Control spacing inside header cells:
Add footer bands to display summaries, totals, or custom content.

Adding Text Footers

Create custom footer bands with specific functionality:

Complete Example: Styled Header with Footers

Header Events

Best Practices

When using sub-columns, the header height automatically adjusts to accommodate all levels. Use RowLines to visually separate levels.
Set ParentFormat := True for column headers to maintain consistent styling unless you need column-specific formatting.
Adjust ResizeTolerance based on your UI density. Higher values (5-8) make it easier for users to grab column edges.

Columns

Learn about column configuration and properties

Sorting

Implement data sorting in your grid

Custom Bands

Create custom grid bands

TColumnHeaderBand API

Complete API reference for header bands