Skip to main content
Table of Contents

TTMSFNCDataGridDatabaseAdapterColumn Class

Maps one dataset field to one grid column and controls how that field is shown and edited.

API unit family: TMSFNCDataGridDatabaseAdapter Inherits from: TCollectionItem

Syntax

GeneratedPascalC++
TTMSFNCDataGridDatabaseAdapterColumn = class(TCollectionItem)
class PASCALIMPLEMENTATION TTMSFNCDataGridDatabaseAdapterColumn : public System::Classes::TCollectionItem

Remarks

Items live in TTMSFNCCustomDataGridDatabaseAdapter.Columns; the item at collection index N drives the grid column at N plus the grid's fixed column count. Adding an item appends matching grid columns when the grid has fewer, deleting an item deletes its grid column, and changing Index moves the grid column along with it.

Items are created automatically from the dataset field list when TTMSFNCCustomDataGridDatabaseAdapter.AutoCreateColumns is True, or explicitly with TTMSFNCDataGridDatabaseAdapterColumns.Add. Use GridColumn to reach the grid column's own appearance and editor settings.

Properties

Name Description
AutoCreated True when the adapter created this column automatically from the dataset field list rather than it being defined explicitly.
CheckBoxField When True, shows the field as a check box that is checked when the field's display text matches the grid column's boolean true value. Default is False.
DataBoolean Custom Boolean payload for application use. Not used by the adapter internally.
DataInteger Custom integer payload for application use. Not used by the adapter internally.
DataObject Custom object reference for application use. Not used by the adapter internally.
DataPointer Custom pointer payload for application use. Not used by the adapter internally.
DataString Custom string payload for application use. Not used by the adapter internally.
Field The TField bound to this column.
FieldName The name of the dataset field shown in this column.
GridColumn Returns the grid column that this mapping drives.
HTMLTemplate HTML template that composes the cell text from one or more fields of the current record. Leave empty to show FieldName normally.
Header Text shown in the column header. When empty, the header shows the field's DisplayLabel, or FieldName when the dataset is closed.
PictureField When True, decodes the field's blob content as an image and shows it in the cell. Default is False.
ProgressField Marks the column as a progress column. Default is False.
UseColumnEditor When True, the adapter leaves the in-place editor type to the grid column's own editor settings. Default is False.
UseLookupEditor When True (default), lookup fields are edited with a combo box filled from the lookup dataset.

Methods

Name Description
Adapter Returns the database adapter that owns this column mapping.