Skip to main content
Table of Contents

TTMSFNCDataGridDatabaseAdapterColumn.HTMLTemplate Property

HTML template that composes the cell text from one or more fields of the current record. Leave empty to show FieldName normally.

API unit family: TMSFNCDataGridDatabaseAdapter Declaring type: TTMSFNCDataGridDatabaseAdapterColumn Type: string

Syntax

FMX.TMSFNCDataGridDatabaseAdapter.hppPascalC++
property HTMLTemplate: string;
__property System::UnicodeString HTMLTemplate = {read=FHTMLTemplate, write=SetHTMLTemplate};

Remarks

Placeholders use the form <#FieldName> and are replaced with the field's DisplayText; blob fields show (MEMO) unless TTMSFNCCustomDataGridDatabaseAdapter.ShowMemoFields is True. An unknown field name is replaced with an empty string.

A templated column is not bound to a single field: TTMSFNCCustomDataGridDatabaseAdapter.FieldAtColumn returns nil for it and its cells cannot be edited. Use TTMSFNCCustomDataGridDatabaseAdapter.OnGetHTMLTemplate to vary the template per cell and TTMSFNCCustomDataGridDatabaseAdapter.OnGetHTMLTemplateData to change individual substituted values.

Examples

Pascal
Adapter.Columns[2].HTMLTemplate := '<b><#LastName></b>, <#FirstName>';