I want to place a custom editor (TDateEdit) in cells of a TTMSFMXGrid.
I am getting exceptions after the date has been edited.
To reproduce this :
Create a new FMX Application.
Drop a TTMSFMXGrid on the main form.
Add FMX.DateTimeUtils to the uses clause.
Create event handlers :
procedure TForm1.TMSFMXGrid1GetCellEditorType(Sender: TObject; ACol,
ARow: Integer; var CellEditorType: TTMSFMXGridEditorType);
begin
CellEditorType := etCustom;
end;
ARow: Integer; var CellEditorType: TTMSFMXGridEditorType);
begin
CellEditorType := etCustom;
end;
procedure TForm1.TMSFMXGrid1GetCellEditorCustomClassType(Sender: TObject;
ACol, ARow: Integer; var CellEditorCustomClassType: TFmxObjectClass);
begin
CellEditorCustomClassType := TDateEdit;
end;
ACol, ARow: Integer; var CellEditorCustomClassType: TFmxObjectClass);
begin
CellEditorCustomClassType := TDateEdit;
end;
Run the program. Try to edit the date in any cell.
I'm using Delphi Tokyo 10.2 Update 1.
TTMSFMXGrid is v2.3.0.11