Bitmaps does not appears all the time.

I include a vine link : https://vine.co/v/i23iMM7zFe6

The configuration of the grid is this:
FView.LiveGrid.UseColumns := True;
   FView.LiveGrid.ScrollMode := smPixelScrolling;
   FView.LiveGrid.Options.Bands.Enabled            := True;
   FView.LiveGrid.Options.Borders.CellBorders      := bVertical;
   FView.LiveGrid.Options.Editing.Enabled          := False;
   FView.LiveGrid.Options.Mouse.DirectEdit         := True;
   FView.LiveGrid.Options.Mouse.ColumnSizing       := True;
   FView.LiveGrid.Options.Mouse.RowDragging        := True;
   FView.LiveGrid.Options.Sorting.FixedColumns     := True;

   FView.LiveGrid.CheckTrue  := 'Y';
   FView.LiveGrid.CheckFalse := 'N';
   FView.LiveGrid.Columns[SURCHARGE].ColumnType := TTMSFMXGridColumnType.ctCheckBox;


And the Event handler used is this:

procedure TGetLinsDlnSlsController.OnGetCellAppearance(Sender: TObject; ACol, ARow: Integer; Cell: TFmxObject; ACellState: TCellState);
begin
   if ARow <= FView.LiveGrid.FixedRows -1 then Exit;

   if Cell is TTMSFMXBitmapGridCell then begin
     TTMSFMXBitmapGridCell(Cell).Bitmap.Align := TAlignLayout.Client;
     TTMSFMXBitmapGridCell(Cell).Bitmap.HitTest := False;
   end;

   case ACol of
      DELETE :begin
         FView.LiveGrid.AddBitmap(ACol, ARow, 'BitmapDELETE');
      end;
   end;
end;

I've used too the event handler OnGetCellProperties

There are too, two Right Columns Fixed, but this does not influences in result.


Please do not add a Bitmap in the OnGetCellAppearance event. When using the grid dynamically you should return the TTMSFMXBitmapGridCell cell type in the OnGetCellClass event and use the OnGetCellProperties event to assign the bitmap to the bitmap property of the TTMSFMXBitmapGridCell

As you said was my first version, but with a similar result.

https://vine.co/v/i2LWaF7bIDT

procedure TGetLinsDlnSlsController.OnGetCellProperties(Sender: TObject; ACol, ARow: Integer; Cell: TFmxObject);
begin
   if ARow <= FView.LiveGrid.FixedRows -1 then Exit;

   if Cell is TTMSFMXBitmapGridCell then begin
     TTMSFMXBitmapGridCell(Cell).Bitmap.Align := TAlignLayout.Client;
     TTMSFMXBitmapGridCell(Cell).Bitmap.HitTest := False;
   end;

   case ACol of
      DELETE :begin
         FView.LiveGrid.AddBitmap(ACol, ARow, 'BitmapDELETE');
      end;
   end;
end;

procedure TGetLinsDlnSlsController.OnGetCellClass(Sender: TObject; ACol, ARow: Integer; var CellClassType: TFmxObjectClass);
begin
   if (ARow >= FView.LiveGrid.FixedRows) and (ACol = DELETE) then begin
      CellClassType := TTMSFMXBitmapGridCell;
   end;
end;


I want to remember you what say the manual about OnGetCellProperties:


	<div title="Page 24">
		<div>
			<div>
				<p><span style="font-size: 11.000000pt; font-family: 'Helvetica'; font-weight: 700">OnGetCellProperties</span><span style="font-size: 11.000000pt; font-family: 'ArialMT'">: Event called to apply additional properties dynamically to the cell.

Through this event, properties can be applied that are unique per column, row or cell. This event
is called simultaneously with the OnGetCellAppearance, but to keep a clean overview it is
recommended to apply all non-cell visual related properties through this event. 




There is a difference between applying additional properties to existing cells and creating cells by adding data through the various amount of helpers such as the AddBitmap call. The AddBitmap call is to add a bitmap grid cell in the underlying data structure. The AddBitmap call should already be executed once for every cell, before the OnGetCellProperties event is called, of course the code you are using to align the bitmap is correct but the code will not be executed unless the cell is a TTMSFMXBitmapGridCell which is added in your code after the align code is called. To solve this issue you need to either use AddBitmap outside of any grid event, or specify the type of cell manually and use a Bitmap.LoadFromFile or a Bitmap.Assign inside the OnGetCellProperties.

I understand. I need to traverse all the rows, after I load the data, calling AddBitmap. 
Ok. 

One more question. I want to change the bitmap showed on the cell, as response to a click of the user. Really I need to change the underlying data, but....

for change the bitmat, need I free the current instance of the bitmap previously?

If so, this means that every cell has a copy of the bitmap on the associated TTMSFMXBitmapContainer component, instead a reference to this bitmap.

And if so, is not to be more reasonable, forget this BitmapContainer component and for every row, insert a bitmap in a TField of the Dataset?

You can use the OnCellBitmapClick or OnCellClick event and change the bitmap with AddBitmap or when use dynamically set af flag which cell had changes, reload the grid with UpdateGrid and then use the LoadFromFile or Assign of the previously loaded grid cell in the OnGetCellProperties. You can also change and access the bitmap with the Bitmaps property or BitmapNames property when combinee with a BitmapContainer