how to prevent "live" repaint of a TTMSFMXGrid

Hello,

I need to change the color of row depending on a value.
Use of CellBeforeDraw event causes important slow down at display. I solved this problem by setting mygrid.colors[Acol, Arow) before showing the form:

with tMyForm.create(application) do
begin
     BindingSToredProc.open;
     for rows := 0 to datagrid.RowCount-1 do
      if datagrid.Cells[19,rows]='1' then
        for cols := 0 to datagrid.Columns.Count-1 do
           datagrid.Colors[cols,rows]:= TAlphaColorRec.Gray;

      Showmodal;
       release;
end;

It works fine, but now, I need to refresh the grid after the first display and this method cuases same slow down as CellBeforeDraw
I tried this way:

datagrid.visible:=false;
for rows := 0 to datagrid.RowCount-1 do
      if datagrid.Cells[19,rows]='1' then
        for cols := 0 to datagrid.Columns.Count-1 do
           datagrid.Colors[cols,rows]:= TAlphaColorRec.Gray;
datagrid.visible:=true;
To force a whole repaint of the grid and not cell after cell but it doesn't work. Is there any way to "disable" momentary the repaint of the grid?

Did you try

grid.BeginUpdate;
grid.EndUpdate;
?

It works fine with grid.beginupdate..Grid.endUpdate, many thanks