YOUSEFUL / DELPHI / COMPONENTS
TAtlasColumnKind
The four value kinds of a TAtlasTable column: text, number, boolean and date.
Description
Every column of a TAtlasTable has one kind. The kind decides which strings AddRow, SetCell, ImportCSV and TAtlasValueEdit accept, the normalized form that is stored, how Sort compares values and how TAtlasGrid aligns them. An empty string is accepted by every kind. Values stay strings: convert them with TFormatSettings.Invariant, never with the user's locale. AtlasNormalizeValue(Kind, Value) applies the rules to a single value.
Members
| Member | Kind | What it does |
|---|---|---|
ackText | value | Any text, stored unchanged (including leading and trailing spaces). |
ackNumber | value | A finite number in invariant format: . as decimal separator, optional sign and exponent, no thousands separators (12.50, -3, 1e3; surrounding spaces are accepted). |
ackBoolean | value | true or false in any case, or 1 / 0. |
ackDate | value | A calendar date written exactly as YYYY-MM-DD: four-digit year 0001 to 9999, two-digit month and day, and a real date (2024-02-29 is accepted, 2025-02-29 is not). |
Values
ackText value
ackTextAny text, stored unchanged (including leading and trailing spaces).
ackNumber value
ackNumberA finite number in invariant format: . as decimal separator, optional sign and exponent, no thousands separators (12.50, -3, 1e3; surrounding spaces are accepted). Stored in the shortest invariant form (12.5, -3, 1000). NaN, INF, 1,000 and locale forms such as 12,5 raise EAtlasDataError. Sorted numerically and right-aligned in TAtlasGrid.
ackBoolean value
ackBooleantrue or false in any case, or 1 / 0. Stored as true or false.
ackDate value
ackDateA calendar date written exactly as YYYY-MM-DD: four-digit year 0001 to 9999, two-digit month and day, and a real date (2024-02-29 is accepted, 2025-02-29 is not). Stored unchanged, so text order is date order. There is no time part and no locale format.
Examples
See what each kind stores
AtlasNormalizeValue returns the stored form or raises, exactly like AddRow. The comments show the output.
uses System.SysUtils, Atlas.Data;
procedure ShowNormalizedValues;
begin
Writeln(AtlasNormalizeValue(ackNumber, '12.50')); // 12.5
Writeln(AtlasNormalizeValue(ackNumber, '1e3')); // 1000
Writeln(AtlasNormalizeValue(ackBoolean, 'TRUE')); // true
Writeln(AtlasNormalizeValue(ackBoolean, '0')); // false
Writeln(AtlasNormalizeValue(ackDate, '2024-02-29')); // 2024-02-29
try
AtlasNormalizeValue(ackNumber, '12,5');
except
on E: EAtlasDataError do
Writeln(E.Message); // Invalid finite number: 12,5
end;
end;Related
TAtlasTable · TAtlasColumn · TAtlasValueEdit
Also in Atlas VCL
TAtlasTable · TAtlasGrid · TAtlasValueEdit · TAtlasTree · TAtlasWorkbook · TAtlasSheetGrid · TAtlasPivot · TAtlasInspector · TAtlasRichEdit · TAtlasSpellChecker · TAtlasChart · TAtlasGauge · TAtlasThemer · TAtlasWizard · TAtlasWorkspace · TAtlasCommandBar · TAtlasActionTile · TAtlasTileBoard · TAtlasNavigation · TAtlasMap · TAtlasGraph · TAtlasDiagram · TAtlasPrintDocument · TAtlasSchedule · TAtlasScheduler · TAtlasTaskPlan · TAtlasGantt · TAtlasPdfDocument · TAtlasPdfViewer