I get an error 'Control '' has no parent window' when setting the format on a DateTimePicker editor in my OnGetEditorType procedure of my AdvStringGrid. Here is my code:
procedure TAlltimeEditForm.GridGetEditorType(Sender: TObject; ACol, ARow: Integer; var AEditor: TEditorType);
begin
case ACol of
1: // value
AEditor := edFloat;
3: // time
begin
AEditor := edTimeEdit;
Grid.DateTimePicker.Format := 'HH:mm';
end;
4: // date
begin
AEditor := edDateEdit;
if ARow - 1 = AT_wetmonth then
Grid.DateTimePicker.Format := 'MMM yyyy'
else
Grid.DateTimePicker.Format := ShortDateFormat;
end;
end;
end;
This used to work OK with previous versions of the Grid. I'm using grid version 5.8.5.1. Is this a bug?
Steve