Please enable JavaScript to view this site.

 

This topic covers the implementation details of TGridTemplate.

 

Scope: cpGridTemplate.pas; class derived from TBtnEditProperty. Prepared from the curated implementation supplied for this review on 2 October 2026.

 

Template.Idx is the template database ID. Name is read only for a positive ID. Path is written for human search/filtering and explicitly is not read back. Editing Path does not select a new template.

 

The constructor’s Template structure includes scan-related fields, but this XML writer exports only ID, name and informational path. The omitted setter/database resolution reconstructs the remaining template state.

 

Notation and shared helper rules: Reading this reference.

 

XML identity and composition

 

No literal rec_type value is emitted directly by the selected routines. A property envelope, an inherited writer or a delegated record can supply its identifying attributes.

 

Inherited implementation: TBtnEditProperty. Follow it when the ordered behavior invokes inherited methods; inherited fields are not repeated as locally owned fields.

 

Exact XML fields and attributes

 

The paths below start at this record or property node. A slash identifies a child element; @ identifies an attribute. Curly braces mark a variable index or expression, not literal XML text. Initial values describe initialization; they do not establish what an omitted individual element does. The Implementation toggle below contains the supplied routines for exact branch order and conversions.

 

Template.Idx

 

XML representation: The text of the Template.Idx element.

 

Reading: Reads the element into aPropValue.Template.Idx.

 

Writing: Stores the text representation of DataValue.Template.Idx whenever the writer reaches this field.

 

Name

 

XML representation: The text of the Name element.

 

Reading: Reads the element into aPropValue.Template.Name when aPropValue.Template.Idx is greater than 0.

 

Writing: Stores DataValue.Template.Name when DataValue.Template.Idx is greater than 0.

 

Path

 

XML representation: The text of the Path element.

 

Writing: Stores DataValue.Template.QxdPath when DataValue.Template.Idx is greater than 0.

 

Import: This routine does not read this field. See the inherited or enclosing implementation where applicable.

 

Initialization and reset values

 

TGridTemplate.CreateInit

 

Setting or temporary variable

Initial value

When it is assigned

PropName

“Template Name”

Always

Required

1

Always

NeedsRescan

false

Always

PropValue.Template.Idx

0

Always

PropValue.Template.Name

an empty string

Always

PropValue.Template.NumPeriods

1

Always

PropValue.Template.PeriodType

1

Always

PropValue.Template.ForceStart

0

Always

PropValue.Template.DoNotSplit

false

Always

PropValue.Template.NumPages

1

Always

PropValue.Template.Width

0

Always

PropValue.Template.Height

0

Always

PropValue.Template.MaxObjectID

0

Always

PropValue.Template.QxdModDate

0.0

Always

PropValue.Template.LastScanDate

0.0

Always

PropValue.Template.QxdPath

an empty string

Always

PropValue.Template.QxdSize

0

Always

MonthlyDateFlow

mdfNotApplicable (0)

Always

MonthlyStartDate

msdNotApplicable (0)

Always

DataValue

PropValue

Always

 

This routine also calls inherited Create; self.FillDisplayValue. See Implementation for their order and any conditional calls.

 

Value namespaces used by this implementation

 

These are declared Pascal ordinal values. Use the ordinal only where the field serializer actually writes ord(...), an integer cast or an equivalent value. Set-marker strings and local option lists have their own representation; sentinel members in an enum are not automatically legal XML choices.

 

TMonthlyDateFlow

 

Ordinal

Declared member

0

mdfNotApplicable

1

mdfContinuous

2

mdfBacktrackEveryMonth

3

mdfBacktrackEveryPage

 

TMonthlyStartDate

 

Ordinal

Declared member

0

msdNotApplicable

1

msdFirstOfTheMonth

2

msdWeekOfFirstOfTheMonth

 

Storage declarations relevant to interpretation

 

These are in-memory member and property types, not a list of mandatory XML children. They retain array bounds, fixed buffers and selector types. The field reference above defines what is actually serialized.

 

Name

Declared type / bounds

Kind

MonthlyDateFlow

TMonthlyDateFlow

member

MonthlyStartDate

TMonthlyStartDate

member

NeedsRescan

boolean

member

 

Implementation details

 

The Implementation toggle contains only TGridTemplate methods. Initializers and helpers belonging to other types are identified separately below. Shared XML-helper limitations are explained in Reading this reference.

 

Implementation