This question appears to have been answered already, possibly by MonkeyStyler/Mike Sutton, however, as I am using Delphi 10 Seattle, provided code and guides don\'t wor
Here is the easy way to add a Combobox to a FMX TGrid. Granted, this solution has the same items in every combo, but that's all I can achieve right now.
type
TComboColumn = class(TPopupColumn)
function CreateCellControl: TStyledControl; override;
end;
...
function TComboColumn.CreateCellControl: TStyledControl;
var
ComR: TComboRecord;
i: Integer;
begin
Result := TComboBoxCell.Create(self);
// now they all have the same drop-down values
ComR := frmMain.ComboData[0];
for i := 0 to Length(ComR.FieldValues) do
TComboBoxCell(Result).Items.Add(ComR.FieldValues[i]);
end
... And just for continuity
procedure TfrmMain.FormCreate(Sender: TObject);
begin
AGrid := TComboExtendedGrid.Create(Self);
AGrid.Parent := Self;
AGrid.Align := TAlignLayout.Client;
AGrid.Options := AGrid.Options + [TGridOption.AlwaysShowEditor];
AGrid.OnGetValue := AGridGetValue;
AGrid.OnSetValue := AGridSetValue;
AGrid.RowCount := 5;
ComboData := TList.Create;
PopulateComboData(AGrid.RowCount);
CCColumn := TComboColumn.Create(AGrid);
CCColumn.Parent := AGrid;
CCColumn.Header := 'Combohere';
end;