You are not logged in.
What is a proper way to change display name for a field in TSQLTableToGrid column, example:
TSQLMyRec = class(TSQLRecord)
private
FDateField: TDateTime;
FFieldName: RawUTF8;
published
property DateField: TDateTime read FDateField write FDateField;
property FieldName: RawUTF8 read FFieldName write FFieldName;
end;
When displaying in grid I would like to be called CustomFieldName instead of FieldName;
Second question is related to, TRecordEditForm, it will create two datetimepicker controls for DateField, first for date part and second for timepart.
I do not need time part since this is a date only field, so is there a way to instruct it not to create timepart control somehow?
OnComponentCreated will be invoked only for first (date) control.
To me, a cleanest solution would be to allow declaring fields with TDate type, they would be stored in DB internally as INTEGER (or text as is TDateTime), but for displaying/editing purposes they would be treated as true date only fields.
Offline
With external DB, the date/time column uses the native date/time type of the DB.
Only under SQLite3 it is stored as iso-8601 text.
We define only a date/time type, since our goal was to reduce the number of types in SynDB.
Then you could customize the displayed value at client code level.
And you better should, since date/time should be stored as UTC in the ORM/DB, and displayed with local zone.
AFAIK you can customize the TSQLTableToGrid returned values, even for field names.
Search for the appropriate event handler.
About TRecordEditForm, try to modify it, and submit your patch.
Offline