Progressbar when using the grid as virtual grid?

I set the grid data via the onGetCellData callback.

One column has progressbars added, via AddDataProgressBar.
It should get the value from the cell data. Setting the celldata via grid.cells[c,r]:=... works, butr setting it via the callback does not.
How can I set the progressbar position when using the grid as a virtual grid which get its values via the onGetCellData callback?

If you are using virtual mode you should use the OnGetCellClass method and then return TTMSFMXProgressGridCell for a particular cell/column and then use the OnGetCellProperties to set the value of the progress bar


procedure TForm1.TMSFMXGrid1GetCellClass(Sender: TObject; ACol, ARow: Integer;
  var CellClassType: TFmxObjectClass);
begin
  CellClassType := TTMSFMXProgressGridCell;
end;

procedure TForm1.TMSFMXGrid1GetCellProperties(Sender: TObject; ACol,
  ARow: Integer; Cell: TFmxObject);
begin
  (Cell as TTMSFMXProgressGridCell).ProgressBar.Value := 10;
end;

Cool, that works! Thanks a lot!