Skip to main content
TeeGrid provides flexible cell and range selection with visual feedback, keyboard navigation, and customizable appearance.

Basic Selection

Access the current selection:

Programmatic Selection

Set selection programmatically:

Selection Events

OnSelect

Fired when selection changes:

Selection Appearance

Customize how selection looks:

Full Row Selection

Select entire rows instead of individual cells:

Range Selection

Select multiple cells:

Mouse Range Selection

Users can select ranges by dragging:

Checking Range Selection

Keyboard Navigation

Control Enter key behavior:

Scroll to View

Automatically scroll to show selection:

Selectable Columns

Control which columns can be selected:

Selection Hover

Highlight cells on mouse hover:

Parent Font

Inherit selection font from parent:

Copy Selection

Copy selected data to clipboard:

Paste to Selection

Paste clipboard data:

Multi-Selection

For advanced multi-selection scenarios:

Selection with Master-Detail

Each row group has independent selection:

Getting Selected Data

Retrieve data from selected cell:

Selection Hit Testing

Check if a point is in selection:

Empty Selection

Check if there’s a selection:

Column Selection

Select entire columns (combined with FullRow):

Selection Context Menu

Show context menu on selection:

Previous Selection

Track previous selection:

Validate Selection

Prevent selection of certain cells:

Best Practices

  • Use OnSelect to respond to selection changes
  • Enable ScrollToView for better user experience
  • Use FullRow := True for record-based data
  • Use Range.Enabled := True for spreadsheet-like grids
  • Customize UnFocused appearance so users can see selection when grid loses focus
  • Make important columns non-selectable with Selectable := False
  • Combine selection with Copy/Paste for data entry workflows
  • Use IsEmpty to check for selection before accessing Column or Row
  • Remember that each row group has its own selection in master-detail grids