Overview
TeeGrid supports custom cell editors for interactive data entry. You can use any VCL/FMX control as a cell editor, including ComboBox, DateTimePicker, TrackBar, CheckBox, and more.Basic Editor Setup
Assigning Editor Classes
Editor Events
OnCellEditing
Called before the editor is shown - use it to initialize the editor:OnCellEdited
Called after editing - use it to process the editor value:Editing Options
Auto-Edit
Always Visible
Enter Key Behavior
Selection Behavior
Text Selection
Advanced: Filterable ComboBox
From the demo, a ComboBox that filters items as you type:Complete Example
FromUnit_Editors.pas:
Available Editor Types
| Editor Class | Use Case | Platform |
|---|---|---|
| TEdit | Text input (default) | VCL, FMX |
| TComboBox | Dropdown selection | VCL, FMX |
| TDateTimePicker | Date/time input | VCL |
| TTrackBar | Numeric slider | VCL, FMX |
| TCheckBox | Boolean values | VCL, FMX |
| TSpinEdit | Integer with +/- buttons | VCL |
| TColorBox | Color selection | VCL |
| TMemo | Multi-line text | VCL, FMX |
Best Practices
- Initialize editors in OnCellEditing (before showing)
- Process values in OnCellEdited (after editing)
- Set ChangeData := False if you handle value setting yourself
- Use AutoEdit for spreadsheet-like behavior
- Configure EnterKey based on your data entry pattern
Next Steps
- Learn about Custom Sorting
- Explore Themes for styling
- See Database Grid for data binding
