TEgDBGridEx - Enhanced Data-Aware Grid for Delphi VCL
TEgDBGridEx is a TDBGrid descendant
compatible with any TDataSet descendant (FireDAC,
ElevateDB, IBX, dbExpress, UniDAC, etc.), adding the display and
usability features below without requiring any change to how the grid is
wired to a dataset. It is a drop-in replacement for
TDBGrid: every inherited property, method, and event is
still available, and the added behavior can be left at its defaults.
If you are using the demo version, the full version can be purchased at sales.easygate.pt.
For support requests, contact support@sales.easygate.pt, or use the online support form.
| Feature | Description | See |
|---|---|---|
| Full VCL Styles and HighDPI ready | Also works with no styles at all. Control per-column over whether the grid’s own colors override the theme’s colors, independently for data cells and for the title row/indicator column. All drawing (checkbox marks, sort arrows, corners, margins, line widths) is scaled consistently for the current DPI. | UseColorOnStyles,
UseFixedColorOnStyles,
UseFontColorOnStyles |
| Multi-line in-place editor | Memo/CLOB and optionally String columns. Line breaks, Tabs, in-text navigation, and live font resizing while editing. | ExtendedStrEditor |
| Vertical alignment, word wrap, shrink-to-fit | Per-column or grid-wide control. | CellVAlign,
CellWordWrap,
ShrinkFontToFit,
TEgColumn |
| Export grid data to Excel (.xlsx) | Exports the grid’s underlying data to a native .xlsx workbook, with no third-party library dependency. Each field is written as its native Excel type (number, date/time, boolean, or text); optionally limited to the currently selected rows. | ExportToXLSX |
| Checkbox with a configurable appearance | Square, Cross, Check mark, with or without a frame. | CheckKind, CheckFrames |
| Clickable images in data cells, column titles, and the grid corner | Each with its own configurable hover cursor and event. | Images, ClickableCursor,
OnCellImageClick,
OnTitleImageClick,
OnCornerImageClick,
TEgColumn |
| Cell preview of Memo/CLOB text and BLOB images | A Memo/CLOB field’s text is shown directly in the cell (optionally capped by a character limit), and a BLOB field’s content is shown as an image when it contains one. | MemoMaxChars,
DetectBlobImages |
| Automatic detection of images formats in BLOB fields | JPEG, PNG, Bitmap, Icon and GIF, with no manual format handling. | DetectBlobImages |
| Full control over each cell contents before it is shown | Background color, font color/alignment/size, image, and even the cell text itself, cell by cell (for example, highlighting or replacing a value based on a condition). | OnBeforeDrawCell |
| Full control over each title cell before it is shown | Same control as above (background, font, image, text), plus the
second SubTitle line’s own font, color and text, per
column, once per title cell rather than once per row. |
OnBeforeDrawTitle |
| Second title line per column, with its own font | An optional SubTitle below Title.Caption,
using its own font and the same alignment as the title - the title row
grows automatically to fit both lines. |
SubTitle,
SubTitleFont |
| Custom columns with no associated field | For computed or derived content that does not come directly from the dataset. | - |
| Automatic row/title height and column width | Fills the available space with no leftover gap. | AutoRowHeight,
AutoTitleHeight,
AutoColumnWidth |
| Explicit fixed row height | Sets every data row to a fixed pixel height (scaled for the current DPI), instead of the automatic height the grid would otherwise compute from the font size. | RowHeightPx |
| Explicit fixed title row height | Same idea as above, for the title row specifically. | TitleRowHeightPx |
| Explicit fixed indicator column width | Forces the width of the fixed indicator column (pixels, DPI-scaled),
instead of TDBGrid’s own native width |
IndicatorWidthPx |
| Grid line width now published, and layout-aware | The inherited GridLineWidth property is now shown in
the Object Inspector, and changing it immediately recalculates any
active
AutoRowHeight/AutoTitleHeight/AutoColumnWidth
result instead of leaving it stale. |
GridLineWidth |
| Built-in column sorting | Title-bar indicator and a dedicated change event. | SortFields,
OnSortChange |
| Customizable delete confirmation prompt | Single-row, multi-row, and post-delete messages may embed
<var>VarID</var> placeholders.
VarID may be a field name or any custom identifier,
automatically evaluated by OnGetVariableValue event. |
DelRowQuestion,
DelRowsQuestion,
DelRowCaption,
OnGetVariableValue |
| Custom Variables and line breaks in text | Tags <var>VarID</var> and
<br> can be used in DelRowQuestion,
DelRowsQuestion, DelRowCaption, inside the
CellText of OnBeforeDrawCell and
OnBeforeDrawTitle, and in a column’s
Title.Caption/SubTitle. VarID is any
identifier, matched against the dataset column names first, then
resolved via a dedicated event if it isn’t one. A
<br> tag inserts a line break |
DelRowQuestion,
DelRowsQuestion,
DelRowCaption,
OnGetVariableValue,
OnBeforeDrawCell,
SubTitle |
| Input validation while typing in numeric columns | Rejects invalid or duplicate symbols and automatically honors the active decimal separator for your region. | - |
| Additional interaction events, at both grid and column level | Click, double-click and right-click, row click. For data cells, cell
images, title and title images - plus an option for Enter to behave like
Tab. Double-click, right-click, and title-click events can each also be
overridden per column (both fire when assigned, grid first);
TDBGrid has none of these events at all, at either
level. |
OnCellDblClick,
OnCellRightClick,
OnRowClick,
OnTitleCellClick,
OnTitleCellRightClick,
TabOnEnter,
TEgColumn |
| Configurable fixed-cell (title/indicator) appearance | Standard, gradient, or flat-gradient rendering for title and indicator cells, with a settable gradient end color. | FixedCellStyle,
FixedColor2 |
| Utility methods to configure columns in bulk, and to locate cells/columns programmatically | Set titles, widths, alignments, or formats for every column in one call instead of one at a time; translate mouse coordinates to grid cells, and look up a column by field name or by title. | SetColumnTitles,
SetColumnWidths,
SetColumnAlignments,
SetColumnFormats,
GetGridCoord,
PointToGridCoord,
PointInCellRect,
ColumnByFieldName,
ColumnByTitle |
Delphi 12 or 13, VCL only.
Requires a TDataSource connected to any
TDataSet descendant, exactly as TDBGrid does;
no dependency on any specific database engine, so it works the same with
any TDataSet descendant. VCL Styles (Vcl.Themes) are
optional - the grid also renders correctly with no custom style
active.
See Setup for adding the units to your project and for design-time (Object Inspector / component palette) use.