Skip to main content
TeeGrid provides powerful cell editing capabilities with support for custom editor controls, automatic text selection, and flexible event handling.

Basic Editing Setup

Enable cell editing through the Editing property:

Editing Properties

AutoEdit

When True, pressing any key automatically shows the cell editor. When False, only F2 or double-clicking starts editing.

AlwaysVisible

Keeps the editor visible when moving from one cell to another:

EnterKey Behavior

Control what happens when pressing Enter while editing:

Text Selection

Control whether text is selected when editing begins:

Custom Cell Editors

Assign different editor controls to each column using EditorClass:

OnCellEditing Event

Called when a cell editor is displayed. Use this to customize the editor:

OnCellEdited Event

Called when editing is finished. Retrieve the new value and update data:

Read-Only Columns

Prevent editing specific columns:
Or make the entire grid read-only:

Programmatic Editing

Start or stop editing programmatically:

Cell Format During Editing

Customize individual cells with formatting:

Best Practices

  • Use OnCellEditing to initialize editor controls (fill ComboBox items, set TrackBar ranges, etc.)
  • Use OnCellEdited to retrieve editor values and update your data
  • Set ChangeData := False when manually updating data to prevent duplicate updates
  • Use column-specific ReadOnly for fields that shouldn’t be edited (like IDs)
  • Consider AlwaysVisible := True for spreadsheet-like data entry workflows