Kramer_Gunter
(Softtouch Software Design)
January 9, 2017, 11:46am
1
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?
Pieter
(Pieter)
January 9, 2017, 2:23pm
2
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;
Kramer_Gunter
(Softtouch Software Design)
January 10, 2017, 4:16am
3
Cool, that works! Thanks a lot!