Skip to main content
Table of Contents

TTMSFNCDataGridCellItemExtended Class

Cell storage object that adds a cell type, bitmap, embedded control settings, comment, hint, read-only flag, merge information, a per-cell layout, and application data slots to TTMSFNCDataGridCellItem.

API unit family: TMSFNCDataGridCell Inherits from: TTMSFNCDataGridCellItem Implements: ITMSFNCCustomReadWriteIO

Syntax

GeneratedPascalC++
TTMSFNCDataGridCellItemExtended = class(TTMSFNCDataGridCellItem, ITMSFNCCustomReadWriteIO)
class PASCALIMPLEMENTATION TTMSFNCDataGridCellItemExtended : public TTMSFNCDataGridCellItem, public ITMSFNCCustomReadWriteIO

Remarks

The grid switches a cell to this class as soon as one of these extras is set, for example through TTMSFNCCustomDataGrid.Controls, TTMSFNCCustomDataGrid.Comments, or TTMSFNCCustomDataGrid.AddCheckBox. Get the extended item of a cell with TTMSFNCCustomDataGrid.CellData followed by IsExtendedCell / AsExtendedCell (or the IsExtended / AsExtended helper properties).

Ownership: the item frees ManagedObject, its bitmap, margins, and per-cell layout. It never frees Control, Object, or the Data* slots; Control is only detached from its parent.

Column settings take priority: when the column has an explicit setting for control alignment, position, margins, size, text, or read-only state, that value is used instead of the value stored here.

Properties

Name Description
Bitmap Bitmap drawn in the cell when Type is gcitBitmap.
BitmapAspectRatio When True, the bitmap keeps its aspect ratio when it is scaled; defaults to True.
BitmapCentered When True, the bitmap is centred in the target rectangle; defaults to True.
BitmapCropped When True, the bitmap is cropped to the target rectangle instead of scaled; defaults to False.
BitmapName Name of an image in the grid's bitmap container, drawn when Bitmap is empty.
BitmapStretched When True, the bitmap is stretched to fill the target rectangle; defaults to False.
BooleanValue Checked state of a gcitCheckBox or gcitRadioButton cell. When True, the control is checked.
ColumnOffset Column distance from this cell to the anchor cell of its merged range; shortcut for MergeInfo.ColumnOffset.
ColumnSpan Number of columns in the merged range this cell belongs to; shortcut for MergeInfo.ColumnSpan.
Comment Comment text attached to the cell.
Control Application-supplied control displayed inside the cell.
ControlAlign Docking mode of the cell control; defaults to gcaNone (placement by ControlPosition).
ControlHeight Height applied to the cell control; defaults to -1 (keep the control's own height).
ControlMargins Margins between the cell edges and a docked cell control.
ControlPosition Placement of the cell control when ControlAlign is gcaNone; defaults to gcpCenterRight.
ControlText Text written to the cell control, for example the caption of a button cell.
ControlWidth Width applied to the cell control; defaults to -1 (keep the control's own width).
DataBoolean Boolean slot for application data; not interpreted by the grid.
DataInteger Integer slot for application data; not interpreted by the grid.
DataObject Object slot for application data; not owned or freed by the cell.
DataPointer Pointer slot for application data; not freed by the cell.
DataString String slot for application data; not interpreted by the grid.
DisplayValue Formatted text the grid paints for this cell. (inherited from TTMSFNCDataGridCellItem)
Hint Hint text shown when the mouse hovers over the cell.
IntegerValue Position of a gcitProgressBar cell.
Invalid When True, DisplayValue is out of date and is regenerated from Value the next time the grid reads the cell. (inherited from TTMSFNCDataGridCellItem)
LayoutPersistence Persistence placeholder that carries the per-cell layout when the cell is saved to or loaded from JSON.
ManagedObject Object owned by the cell: it is freed when the cell item is cleared or destroyed.
MergeInfo Merge geometry of this cell; see TTMSFNCDataGridCellMergeInfo.
RadioGroupIndex Group number of a radio-button cell; defaults to 0.
ReadOnly When True, the cell cannot be edited; defaults to False.
RowOffset Row distance from this cell to the anchor cell of its merged range; shortcut for MergeInfo.RowOffset.
RowSpan Number of rows in the merged range this cell belongs to; shortcut for MergeInfo.RowSpan.
Value Raw value stored for this cell (TValue, or JSValue on the web framework). (inherited from TTMSFNCDataGridCellItem)

Methods

Name Description
Clear Empties Value and DisplayValue and marks the item Invalid so the display text is rebuilt. (inherited from TTMSFNCDataGridCellItem)
HasMergeInfo Returns True when this cell belongs to a merged range.

Used by