Stringgrid row color

Hello, I am looking for change text color in grid.

actually i use that code :

for i := 0 to sgGrid.ColCount - 1 do 
begin
  sgGrid.FontColors[i, query.RecNo + 1] := clgreen;
end;

Is it possible to change text color only at several row without loop and changing every column?

with best regards V. Klamm

You can use the OnGetCellColor event.

Set the AFont.Color to whatever you need based on the ARow and ACol values.

thank you :slight_smile:
I will try it :wink: